Versions in this module Expand all Collapse all v1 v1.4.2 Sep 9, 2019 v1.4.1 Aug 12, 2019 Changes in this version + const DefaultN + const DefaultP + const DefaultR + const KeySize + const NonceSize + const Overhead + type CryptoKey [KeySize]byte + func GenerateCryptoKey() (*CryptoKey, error) + func (ck *CryptoKey) Decrypt(in []byte) ([]byte, error) + func (ck *CryptoKey) Encrypt(in []byte) ([]byte, error) + func (ck *CryptoKey) Zero() + type Parameters struct + Digest [sha256.Size]byte + N int + P int + R int + Salt [KeySize]byte + type SecretKey struct + Key *CryptoKey + Parameters Parameters + func NewSecretKey(password *[]byte, N, r, p int) (*SecretKey, error) + func (sk *SecretKey) Decrypt(in []byte) ([]byte, error) + func (sk *SecretKey) DeriveKey(password *[]byte) error + func (sk *SecretKey) Encrypt(in []byte) ([]byte, error) + func (sk *SecretKey) Marshal() []byte + func (sk *SecretKey) Unmarshal(marshalled []byte) error + func (sk *SecretKey) Zero()