Documentation ¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func Base64Decode(encodedData string) (result []byte, err error)
- func Base64Encode(origData []byte) (result string)
- func FlatCompress(origData []byte) (result []byte, err error)
- func FlatUnCompress(compressData []byte) (result []byte, err error)
- func MD5(origData []byte) (result string)
- func MD5File(fileName string) (result string, err error)
- func PKCS5Padding(plaintext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Sha1(origData []byte) (result string)
- func Sha1File(fileName string) (result string, err error)
- func Sha256(origData []byte) (result string)
- func Sha256File(fileName string) (result string, err error)
- func Sha512(origData []byte) (result string)
- func Sha512File(fileName string) (result string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt @brief:AES解密 AES秘钥的长度只能是16、24或32字节,分别对应三种AES,即AES-128, AES-192和AES-256,三者的区别是加密的轮数不同;
func AesEncrypt ¶
AesEncrypt @brief:AES加密 AES秘钥的长度只能是16、24或32字节,分别对应三种AES,即AES-128, AES-192和AES-256,三者的区别是加密的轮数不同;
func Base64Decode ¶
func Base64Encode ¶
func FlatCompress ¶
func FlatUnCompress ¶
func PKCS5Padding ¶
PKCS5Padding @brief:填充明文
func Sha256File ¶
func Sha512File ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.