Documentation ¶
Index ¶
- Constants
- Variables
- type 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
- 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
- type 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)
Constants ¶
View Source
const ( // Argon2KDF name Argon2KDF = "argon2id" StandardArgon2Time = 4 StandardArgon2Memory = 256 * 1024 StandardArgon2Threads = 4 // Argon2DKLen get derived key length Argon2DKLen = 64 Argon2CipherName = "aes-256-ctr" )
View Source
const ( // BalloonKDF name BalloonKDF = "balloon" StandardBalloonTime = 16 StandardBalloonSpace = 8 * 1024 // BalloonDKLen get derived key length BalloonDKLen = 64 BalloonCipherName = "aes-256-ctr" )
View Source
const ( // ScryptKDF name ScryptKDF = "scrypt" // StandardScryptN N parameter of Scrypt encryption algorithm StandardScryptN = 1 << 17 // StandardScryptR r parameter of Scrypt encryption algorithm StandardScryptR = 8 // StandardScryptP p parameter of Scrypt encryption algorithm StandardScryptP = 1 // ScryptDKLen get derived key length ScryptDKLen = 32 ScryptCipherName = "aes-128-ctr" )
Variables ¶
View Source
var ( // ErrVersionInvalid version not supported ErrVersionInvalid = errors.New("version not supported") // ErrKDFInvalid cipher not supported ErrKDFInvalid = errors.New("kdf not supported") // ErrCipherInvalid cipher not supported ErrCipherInvalid = errors.New("cipher not supported") // ErrDecrypt decrypt failed ErrDecrypt = errors.New("could not decrypt key with given passphrase") )
Functions ¶
This section is empty.
Types ¶
type Argon2 ¶
func (*Argon2) DecryptKey ¶
type Scrypt ¶
func (*Scrypt) DecryptKey ¶
Click to show internal directories.
Click to hide internal directories.