Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveKeys ¶
PBKDF2 for generating encryption and auth keys, derived from secret/salt. Returns two keys; 32-byte encryption key (AES-256) and 64-byte auth key (SHA1).
Types ¶
type Crypter ¶
type Crypter interface { Encrypt(plaintext []byte) (ciphertext []byte, err error) Decrypt(ciphertext []byte) (plaintext []byte, err error) EncryptReader(plaintext io.Reader) (ciphertext io.Reader, err error) DecryptReader(ciphertext io.Reader) (plaintext io.Reader, err error) }
func NewCrypter ¶
Encrypt and decrypt using AES-256 in CBC (block chaining) mode. The ciphertext is signed/authenticated by an HMAC-SHA1 signature. Our encryption envelope consists of (iv||ciphertext||hmac).
Click to show internal directories.
Click to hide internal directories.