Versions in this module Expand all Collapse all v0 v0.5.3 Jun 14, 2019 v0.5.2 Jun 6, 2019 v0.5.1 May 25, 2019 v0.5.0 May 23, 2019 Changes in this version + const Argon2CipherName + const Argon2DKLen + const Argon2KDF + const BalloonCipherName + const BalloonDKLen + const BalloonKDF + const ScryptCipherName + const ScryptDKLen + const ScryptKDF + const StandardArgon2Memory + const StandardArgon2Threads + const StandardArgon2Time + const StandardBalloonSpace + const StandardBalloonTime + const StandardScryptN + const StandardScryptP + const StandardScryptR + var ErrCipherInvalid = errors.New("cipher not supported") + var ErrDecrypt = errors.New("could not decrypt key with given passphrase") + var ErrKDFInvalid = errors.New("kdf not supported") + var ErrVersionInvalid = errors.New("version not supported") + type Argon2 struct + Memory uint32 + Threads uint8 + Time uint32 + func NewArgon2() *Argon2 + func (a *Argon2) Decrypt(data []byte, passphrase []byte) ([]byte, error) + func (a *Argon2) DecryptKey(keyjson []byte, passphrase []byte) ([]byte, error) + func (a *Argon2) Encrypt(data []byte, passphrase []byte) ([]byte, error) + func (a *Argon2) EncryptKey(address string, data []byte, passphrase []byte) ([]byte, error) + type Balloon struct + Space uint64 + Time uint64 + func NewBalloon() *Balloon + func (b *Balloon) Decrypt(data []byte, passphrase []byte) ([]byte, error) + func (b *Balloon) DecryptKey(keyjson []byte, passphrase []byte) ([]byte, error) + func (b *Balloon) Encrypt(data []byte, passphrase []byte) ([]byte, error) + func (b *Balloon) EncryptKey(address string, data []byte, passphrase []byte) ([]byte, error) + type Cipher interface + Decrypt func(data []byte, passphrase []byte) ([]byte, error) + DecryptKey func(keyjson []byte, passphrase []byte) ([]byte, error) + Encrypt func(data []byte, passphrase []byte) ([]byte, error) + EncryptKey func(address string, data []byte, passphrase []byte) ([]byte, error) + type Scrypt struct + N int + P int + R int + func NewScrypt() *Scrypt + func (s *Scrypt) Decrypt(data []byte, passphrase []byte) ([]byte, error) + func (s *Scrypt) DecryptKey(keyjson []byte, passphrase []byte) ([]byte, error) + func (s *Scrypt) Encrypt(data []byte, passphrase []byte) ([]byte, error) + func (s *Scrypt) EncryptKey(address string, data []byte, passphrase []byte) ([]byte, error)