Documentation
¶
Overview ¶
Package crypt provides password-based encryption and decryption of data streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypter ¶
Crypter encrypt/decrypts with AES (Rijndael) in cipher block counter mode (CTR) and authenticate with HMAC-SHA.
type Key ¶
type Key interface {
// Derive returns the AES key and HMAC-SHA key, for the given password,
// salt combination.
Derive(salt []byte) (aesKey, hmacKey []byte)
// Size returns the key-size. Key-size should either 16, 24, or 32 to
// select AES-128, AES-192, or AES-256.
Size() int
// Reset resets/flushes the key.
Reset()
}
Key defines the key derivation function interface.
func NewPbkdf2Key ¶
NewPbkdf2Key returns the key derivation function PBKDF2 as defined in RFC 2898.
func NewScryptKey ¶
NewScryptKey returns the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions".
Click to show internal directories.
Click to hide internal directories.