Documentation
¶
Index ¶
- func AESGCMDecrypt(data, key []byte) ([]byte, error)
- func AESGCMEncrypt(data, key []byte) ([]byte, error)
- func HmacSha2Sum256(data, key []byte) []byte
- func HmacSha3Sum256(data, key []byte) []byte
- func RandomBytes(data []byte) error
- func Sha2Sum256(data []byte) []byte
- func Sha3Sum256(data []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESGCMDecrypt ¶
AESGCMDecrypt decrypts data encrypted by AESGCMEncrypt Return errors if the data can not be decrypted or can not pass integrity verification
func AESGCMEncrypt ¶
AESGCMEncrypt encrypts data by AES in GCM mode with random nonce header `data` can be bytes in any length `key` should be a slice with length 16 / 24 / 32 Result = (Nonce [12] byte + EncryptedData [] byte + Tag [16] byte)
func HmacSha2Sum256 ¶
HmacSha2Sum256 calculates HMAC-SHA2-256 signature
func HmacSha3Sum256 ¶
HmacSha3Sum256 calculates HMAC-SHA3-256 signature
func RandomBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.