Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMessageAuthFailed = errors.New("message authentication failed")
Functions ¶
func Decrypt ¶
Decrypt decrypts data using 256-bit AES-CTR and provides message authentication verifying the HMAC-512_256 signature.
func Encrypt ¶
Encrypt encrypts data using 256-bit AES-CTR and provides message authentication by signing the data with HMAC-512_256.
func NewEncryptionKey ¶
func NewEncryptionKey() *[32]byte
NewEncryptionKey generates a random 256-bit key for Encrypt() and Decrypt(). It panics if the source of randomness fails.
func NewRandomIV ¶
func NewRandomIV() []byte
NewRandomIV generates a random 128-bit IV for use with AES encryption. It panics if the source of randomness fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.