Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyLength = 32 // aes256 ArgonTime = 1 ArgonMemory = 64 * 1024 ArgonThreads = 4 )
View Source
const ( NonceLength = 16 LenLength = 4 // uint32 MACLength = 32 // sha256 )
Variables ¶
View Source
var ( ErrEmptyPassword = errors.New("password is empty") ErrBadPassword = errors.New("bad password") ErrShortData = errors.New("encrypted data is short") ErrIncorrectPadding = errors.New("data is incorrectly padded") )
View Source
var ConstantIV [16]byte
constant IV is fine because we rotate keys each time, keys is defined by a password and KDF nonce. Since KDF nonce is regenerated, we do not have a persistent key. Thus, an attack on a first block is not relevan for us. it means, we can skip storing and generating IV https://stackoverflow.com/a/2648345
Functions ¶
This section is empty.
Types ¶
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
func (*Vault) MarshalBinary ¶
func (*Vault) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.