Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2015 Changes in this version + const Extension + var ErrBufferTooSmall = errors.New("destination buffer too small") + var ErrInvalidCiphertext = errors.New("invalid ciphertext, same slice used for plaintext") + var ErrUnauthenticated = errors.New("ciphertext verification failed") + func Decrypt(ks *Key, plaintext []byte, ciphertextWithMac []byte) ([]byte, error) + func DecryptFrom(ks *Key, rd io.Reader) (io.ReadCloser, error) + func Encrypt(ks *Key, ciphertext []byte, plaintext []byte) ([]byte, error) + func EncryptTo(ks *Key, wr io.Writer) io.WriteCloser + type EncryptionKey [32]byte + func (k *EncryptionKey) MarshalJSON() ([]byte, error) + func (k *EncryptionKey) UnmarshalJSON(data []byte) error + func (k *EncryptionKey) Valid() bool + type Key struct + Encrypt EncryptionKey + MAC MACKey + func KDF(N, R, P int, salt []byte, password string) (*Key, error) + func NewRandomKey() *Key + func (k *Key) Valid() bool + type MACKey struct + K [16]byte + R [16]byte + func (k *MACKey) Valid() bool + func (m *MACKey) MarshalJSON() ([]byte, error) + func (m *MACKey) UnmarshalJSON(data []byte) error v0.1.0-doc Feb 21, 2016