Documentation
¶
Index ¶
- func AESCBCDecrypt(cipherKey, ciphertext []byte, useBase64 ...bool) ([]byte, error)
- func AESCBCEncrypt(cipherKey, plainText []byte, useBase64 ...bool) []byte
- func AESCTRDecrypt(cipherKey, ciphertext []byte, useBase64 ...bool) ([]byte, error)
- func AESCTREncrypt(cipherKey, plainText []byte, useBase64 ...bool) []byte
- func AESDecrypt(cipherKey, ciphertext []byte, useBase64 ...bool) ([]byte, error)
- func AESEncrypt(cipherKey, plainText []byte, useBase64 ...bool) []byte
- func Fnv1aToUint32(b []byte) uint32
- func Fnv1aToUint64(b []byte) uint64
- func Md5(b []byte) string
- func Sha1(b []byte) string
- func Sha256(b []byte) string
- func Sha512(b []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCBCDecrypt ¶
AESCBCDecrypt hex decodes a piece of data and then decrypts it using CBC mode. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func AESCBCEncrypt ¶
AESCBCEncrypt uses CBC mode to encrypt a piece of data and then encodes it in hex. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func AESCTRDecrypt ¶
AESCTRDecrypt hex decodes a piece of data and then decrypts it using CTR mode. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func AESCTREncrypt ¶
AESCTREncrypt uses CTR mode to encrypt a piece of data and then encodes it in hex. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func AESDecrypt ¶
AESDecrypt hex decodes a piece of data and then decrypts it using ECB mode. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func AESEncrypt ¶
AESEncrypt uses ECB mode to encrypt a piece of data and then encodes it in hex. The cipherKey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
func Fnv1aToUint32 ¶
Fnv1aToUint32 returns the 32-bit FNV-1a hash sum of b.
func Fnv1aToUint64 ¶
Fnv1aToUint64 returns the 64-bit FNV-1a hash sum of b.
Types ¶
This section is empty.