Versions in this module Expand all Collapse all v1 v1.1.1 Feb 17, 2022 Changes in this version + const AES128KeyLength + const AES192KeyLength + const AES256KeyLength + const HMACSHA256KeyLength + const HMACSHA512KeyLength + var ErrCipherTextMissingNonce = errors.New(...) + func CompareHMAC(hashA []byte, hashB []byte) bool + func CreateHMACSHA256(key []byte, plaintext []byte) []byte + func CreateHMACSHA512(key []byte, plaintext []byte) []byte + func DecodeB64(str string) ([]byte, error) + func DecodeHex(str string) ([]byte, error) + func DecryptTextAESGCM(key []byte, ciphertext []byte) ([]byte, error) + func EncodeB64(seq []byte) string + func EncodeHex(seq []byte) string + func EncryptTextAESGCM(key []byte, plaintext []byte) ([]byte, error) + func GenerateAES128Key() ([]byte, error) + func GenerateAES192Key() ([]byte, error) + func GenerateAES256Key() ([]byte, error) + func GenerateCryptoPIN(length int) (string, error) + func GenerateCryptoSequence(length int) ([]byte, error) + func GenerateHMACSHA256Key() ([]byte, error) + func GenerateHMACSHA512Key() ([]byte, error) + func GeneratePIN(length int) string