package crypto

Import Path
	crypto (on golang.org and go.dev)

Dependency Relation
	imports 3 packages, and imported by 9 packages

Involved Source Files
	d-> crypto.go

Exported Type Names

type Decrypter (interface) 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. (T) Decrypt(rand io.Reader, msg []byte, opts DecrypterOpts) (plaintext []byte, err error) (T) Public() PublicKey crypto/rsa.(*PrivateKey)
type DecrypterOpts (interface) func Decrypter.Decrypt(rand io.Reader, msg []byte, opts DecrypterOpts) (plaintext []byte, err error) func crypto/rsa.(*PrivateKey).Decrypt(rand io.Reader, ciphertext []byte, opts DecrypterOpts) (plaintext []byte, err error)
type Hash uint Hash identifies a cryptographic hash function that is implemented in another package. (T) Available() bool (T) HashFunc() Hash (T) New() hash.Hash (T) Size() int (T) String() string T : SignerOpts T : expvar.Var T : fmt.Stringer func Hash.HashFunc() Hash func SignerOpts.HashFunc() Hash func crypto/rsa.(*PSSOptions).HashFunc() Hash func RegisterHash(h Hash, f func() hash.Hash) func crypto/rsa.SignPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, hash Hash, hashed []byte) ([]byte, error) func crypto/rsa.SignPSS(rand io.Reader, priv *rsa.PrivateKey, hash Hash, digest []byte, opts *rsa.PSSOptions) ([]byte, error) func crypto/rsa.VerifyPKCS1v15(pub *rsa.PublicKey, hash Hash, hashed []byte, sig []byte) error func crypto/rsa.VerifyPSS(pub *rsa.PublicKey, hash Hash, digest []byte, sig []byte, opts *rsa.PSSOptions) error const BLAKE2b_256 const BLAKE2b_384 const BLAKE2b_512 const BLAKE2s_256 const MD4 const MD5 const MD5SHA1 const RIPEMD160 const SHA1 const SHA224 const SHA256 const SHA384 const SHA3_224 const SHA3_256 const SHA3_384 const SHA3_512 const SHA512 const SHA512_224 const SHA512_256
type PrivateKey (interface) PrivateKey represents a private key using an unspecified algorithm. func crypto/ecdsa.(*PrivateKey).Equal(x PrivateKey) bool func crypto/ed25519.PrivateKey.Equal(x PrivateKey) bool func crypto/rsa.(*PrivateKey).Equal(x PrivateKey) bool
type PublicKey (interface) PublicKey represents a public key using an unspecified algorithm. func Decrypter.Public() PublicKey func Signer.Public() PublicKey func crypto/ecdsa.(*PrivateKey).Public() PublicKey func crypto/ed25519.PrivateKey.Public() PublicKey func crypto/rsa.(*PrivateKey).Public() PublicKey func crypto/ecdsa.(*PublicKey).Equal(x PublicKey) bool func crypto/ed25519.PublicKey.Equal(x PublicKey) bool func crypto/rsa.(*PublicKey).Equal(x PublicKey) bool
type Signer (interface) 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. (T) Public() PublicKey (T) Sign(rand io.Reader, digest []byte, opts SignerOpts) (signature []byte, err error) 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)
type SignerOpts (interface) SignerOpts contains options for signing with a Signer. (T) HashFunc() Hash 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)
Exported Values
const BLAKE2b_256 Hash = 17 // import golang.org/x/crypto/blake2b
const BLAKE2b_384 Hash = 18 // import golang.org/x/crypto/blake2b
const BLAKE2b_512 Hash = 19 // import golang.org/x/crypto/blake2b
const BLAKE2s_256 Hash = 16 // import golang.org/x/crypto/blake2s
const MD4 Hash = 1 // import golang.org/x/crypto/md4
const MD5 Hash = 2 // import crypto/md5
const MD5SHA1 Hash = 8 // no implementation; MD5+SHA1 used for TLS RSA
func RegisterHash(h Hash, f func() hash.Hash) 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.
const RIPEMD160 Hash = 9 // import golang.org/x/crypto/ripemd160
const SHA1 Hash = 3 // import crypto/sha1
const SHA224 Hash = 4 // import crypto/sha256
const SHA256 Hash = 5 // import crypto/sha256
const SHA384 Hash = 6 // import crypto/sha512
const SHA3_224 Hash = 10 // import golang.org/x/crypto/sha3
const SHA3_256 Hash = 11 // import golang.org/x/crypto/sha3
const SHA3_384 Hash = 12 // import golang.org/x/crypto/sha3
const SHA3_512 Hash = 13 // import golang.org/x/crypto/sha3
const SHA512 Hash = 7 // import crypto/sha512
const SHA512_224 Hash = 14 // import crypto/sha512
const SHA512_256 Hash = 15 // import crypto/sha512