Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt encrypts the given data with the given passphrase. It uses AES-GCM with a random nonce generated by cipher.NewGCMWithRandomNonce, which, unlike cipher.NewGCM with a caller-supplied nonce, is allowed in FIPS 140-only mode (GODEBUG=fips140=only).
func KeyFromPassphrase ¶
KeyFromPassphrase generates 32 byte key from the passphrase
func KeyFromSecret ¶ added in v3.5.10
KeyFromSecret derives a 32 byte key from a high-entropy secret with HKDF-SHA256. Unlike KeyFromPassphrase (scrypt), HKDF is a FIPS 140-3 approved key derivation function. It does no key stretching, so the secret must already be random, such as the server signature.
Types ¶
This section is empty.