Documentation
¶
Index ¶
Constants ¶
View Source
const KeyLength = 32
KeyLength is the min length of the secret key
Variables ¶
View Source
var ( ErrShortKey = fmt.Errorf("key is too short, %d bytes is required", KeyLength) ErrInvalidHexString = fmt.Errorf("ciphertext is not a valid hex string") ErrShortData = fmt.Errorf("data is too short") )
errors
Functions ¶
func DecryptString ¶
DecryptString decrypts a hex form ciphertext to the plaintext using 256-bit AES-GCM, key must have length 32 or more
func EncryptString ¶
EncryptString encrypts plaintext to ciphertext (hex form) using 256-bit AES-GCM, key must have length 32 or more
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.