Documentation ¶
Overview ¶
Package gcrypt is an util to work with aes 256 encryption. It supports key derivation from user a provided password. The derivation either generates a new salt or uses a provided one.
Salt must be unique for each password.
Encrypt uses 256 bit key (probably derivated from a user provided password) and uses aes 256 with CFB mode. After a data is encrypted, HMAC is calculated and appended to encrypted data.
Decrypt checks if HMAC is valid; return error if it is not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DerivateKey256 ¶
DerivateKey256 creates 256 bit key based on a password. Random salt is returned with the key.
func DerivateKey256WithSalt ¶
DerivateKey256WithSalt creates 256 bit key from provided password and salt.
Types ¶
This section is empty.