Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypter ¶
type Crypter interface { // Append to dst and return updated slice. Encrypt(dst, plaintext []byte) (result []byte, err error) Decrypt(ciphertext []byte) (plaintext []byte, err error) }
A Crypter knows how to encrypt and decrypt arbitrary byte strings.
type KeyDeriver ¶
An object that knows how to derive a crypto key, given a user password and a random salt.
func NewPbkdf2KeyDeriver ¶
func NewPbkdf2KeyDeriver(iters int, keyLen int, h func() hash.Hash) KeyDeriver
Create a key deriver that uses the PBKDF2 key derivation function of RFC 2898 / PKCS #5 v2.0.
type NotAuthenticError ¶
type NotAuthenticError struct {
// contains filtered or unexported fields
}
*NotAuthenticError may be returned by Crypter.Decrypt if the input is otherwise well-formed but the ciphertext doesn't check out as authentic. This could be due to an incorrect key or corrupted ciphertext.
func (*NotAuthenticError) Error ¶
func (e *NotAuthenticError) Error() string
Click to show internal directories.
Click to hide internal directories.