Involved Source Files
Package crypto collects common cryptographic constants.
Package-Level Type Names (total 7, all are exported)
/* sort exporteds by: | */
Decrypter is an interface for an opaque private key that can be used for
asymmetric decryption operations. An example would be an RSA key
kept in a hardware module.
Decrypt decrypts msg. The opts argument should be appropriate for
the primitive used. See the documentation in each implementation for
details.
Public returns the public key corresponding to the opaque,
private key.
*crypto/rsa.PrivateKey
Signer is an interface for an opaque private key that can be used for
signing operations. For example, an RSA key kept in a hardware module.
Public returns the public key corresponding to the opaque,
private key.
Sign signs digest with the private key, possibly using entropy from
rand. For an RSA key, the resulting signature should be either a
PKCS #1 v1.5 or PSS signature (as indicated by opts). For an (EC)DSA
key, it should be a DER-serialised, ASN.1 signature structure.
Hash implements the SignerOpts interface and, in most cases, one can
simply pass in the hash function used as opts. Sign may also attempt
to type assert opts to other types in order to obtain algorithm
specific values. See the documentation in each package for details.
Note that when a signature of a hash of a larger message is needed,
the caller is responsible for hashing the larger message and passing
the hash (as digest) and the hash function (as opts) to Sign.
*crypto/ecdsa.PrivateKey
crypto/ed25519.PrivateKey
*crypto/rsa.PrivateKey
func crypto/x509.CreateRevocationList(rand io.Reader, template *x509.RevocationList, issuer *x509.Certificate, priv Signer) ([]byte, error)
SignerOpts contains options for signing with a Signer.
HashFunc returns an identifier for the hash function used to produce
the message passed to Signer.Sign, or else zero to indicate that no
hashing was done.
Hash
*crypto/rsa.PSSOptions
func Signer.Sign(rand io.Reader, digest []byte, opts SignerOpts) (signature []byte, err error)
func crypto/ecdsa.(*PrivateKey).Sign(rand io.Reader, digest []byte, opts SignerOpts) ([]byte, error)
func crypto/ed25519.PrivateKey.Sign(rand io.Reader, message []byte, opts SignerOpts) (signature []byte, err error)
func crypto/rsa.(*PrivateKey).Sign(rand io.Reader, digest []byte, opts SignerOpts) ([]byte, error)
Package-Level Functions (only one, which is exported)
RegisterHash registers a function that returns a new instance of the given
hash function. This is intended to be called from the init function in
packages that implement hash functions.
Package-Level Variables (total 2, neither is exported)
The pages are generated with Goldsv0.4.2. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.