Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidKeySize = errors.New("invalid key size: must be 32 bytes")
View Source
var ErrNoEncryptionKey = errors.New("encryption key is required")
View Source
var ErrShortCipherText = errors.New("ciphertext too short")
View Source
var ErrZeroKey = errors.New("encryption key cannot be all zeros")
Functions ¶
func DecryptStringWithKey ¶
DecryptStringWithKey decrypts data using secretbox with the provided key
func EncryptWithKey ¶
EncryptWithKey encrypts data using NaCl's secretbox with the provided key. 40 bytes of overhead (24-byte nonce + 16-byte MAC) are added to the plaintext size.
func GenerateKey ¶
GenerateKey generates a random 32-byte key to be used by EncryptWithKey and DecryptWithKey
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.