Documentation ¶
Overview ¶
Package crypto provides functions to for cryptography and random numbers.
Index ¶
Constants ¶
View Source
const ( StateDiskKeyLength = 32 // DerivedKeyLengthDefault is the default length in bytes for KMS derived keys. DerivedKeyLengthDefault = 32 // MasterSecretLengthDefault is the default length in bytes for CLI generated master secrets. MasterSecretLengthDefault = 32 // MasterSecretLengthMin is the minimal length in bytes for user provided master secrets. MasterSecretLengthMin = 16 // RNGLengthDefault is the number of bytes used for generating nonces. RNGLengthDefault = 32 // HKDFInfoPrefix is the prefix used for the info parameter in HKDF. HKDFInfoPrefix = "key-" )
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificateSerialNumber ¶
GenerateCertificateSerialNumber generates a random serial number for an X.509 certificate.
func GenerateRandomBytes ¶
GenerateRandomBytes reads length bytes from getrandom(2) if available, /dev/urandom otherwise.
func PemToX509Cert ¶
func PemToX509Cert(raw []byte) (*x509.Certificate, error)
PemToX509Cert takes a list of PEM encoded certificates, parses the first one and returns it.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package testvector provides test vectors for key derivation and crypto functions.
|
Package testvector provides test vectors for key derivation and crypto functions. |
Click to show internal directories.
Click to hide internal directories.