Documentation ¶
Overview ¶
Package cryptoKit 本文件来自于gogf/gf的crypto/gaes/gaes.go
Package cryptoKit 加密工具包
Index ¶
- func AESDecryptCBC(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func AESDecryptCFB(cipherText []byte, key []byte, unPadding int, iv ...[]byte) ([]byte, error)
- func AESEncryptCBC(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func AESEncryptCFB(plainText []byte, key []byte, padding *int, iv ...[]byte) ([]byte, error)
- func Base64Decode(str string) (string, error)
- func Base64Encode(str string) string
- func Hmac256(str, secret string) string
- func Md5(str string) string
- func Md5ToUpper(str string) string
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte, blockSize int) ([]byte, error)
- func Sha256(str string) string
- func Sha256ToUpper(str string) string
- func UnicodeDecode(str string) (string, error)
- func UnicodeEncode(str string) string
- func UrlDecode(str string) (string, error)
- func UrlEncode(str string) string
- func ZeroPadding(cipherText []byte, blockSize int) ([]byte, int)
- func ZeroUnPadding(plaintext []byte, unPadding int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecryptCBC ¶
AESDecryptCBC AES使用CBC模式解密
- 注意,密钥必须是16/24/32位长度
- @param cipherText 加密字符串
- @param key 密钥
- @param iv 向量
func AESDecryptCFB ¶
AESDecryptCFB AES CFB解密
- 注意,密钥必须是16/24/32位长度。
- @param cipherText 密文
- @param key 密钥
- @param unPadding 去填充
- @param iv 向量
func AESEncryptCBC ¶
AESEncryptCBC AES使用CBC模式加密
- 注意,密钥必须是16/24/32位长度
- @param plainText 待加密内容
- @param key 密钥
- @param iv 向量
func AESEncryptCFB ¶
AESEncryptCFB AEC CFB模式加密
- 注意,密钥必须是16/24/32位长度。
- @param plainText 明文
- @param key 密钥
- @param padding 填充
- @param iv 向量
func PKCS5UnPadding ¶
PKCS5UnPadding 反填充
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.