Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PKCS7Padding ¶
补码(AES算法PKCS#7和PKCS#5一致)
Types ¶
type CryptoAES ¶
type CryptoAES interface { //获取当前AES模式 GetMode() AES_Mode //加密后返回二进制字节数据切片 Encrypt([]byte) ([]byte, error) //加密后将密文做BASE64编码字符串 EncryptBase64([]byte) (string, error) //解密后返回二进制字节数据切片 Decrypt([]byte) ([]byte, error) //解密BASE64编码字符串的密文后返回二进制切片 DecryptBase64(string) ([]byte, error) }
func NewCryptoAES ¶
aesType AES加密模式 key 长度必须为16/24/32字节(128/192/256 bits) iv 向量长度固定16字节(ECB模式可传nil)
Click to show internal directories.
Click to hide internal directories.