Documentation ¶
Overview ¶
包gaes提供了AES加密/解密算法的有用API。
Index ¶
- Constants
- func Decrypt别名(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func Encrypt别名(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func PKCS5Padding(src []byte, blockSize ...int) []byte
- func PKCS5UnPadding(src []byte, blockSize ...int) ([]byte, error)
- func PKCS7Padding(src []byte, blockSize int) []byte
- func PKCS7UnPadding(src []byte, blockSize int) ([]byte, error)
- func X加密CBC(待加密 []byte, 秘钥 []byte, iv ...[]byte) ([]byte, error)
- func X加密CFB(待加密 []byte, 秘钥 []byte, padding *int, iv ...[]byte) ([]byte, error)
- func X解密CBC(待解密 []byte, 秘钥 []byte, iv ...[]byte) ([]byte, error)
- func X解密CFB(待解密 []byte, 秘钥 []byte, unPadding int, iv ...[]byte) ([]byte, error)
- func ZeroPadding(cipherText []byte, blockSize int) ([]byte, int)
- func ZeroUnPadding(plaintext []byte, unPadding int) []byte
Constants ¶
View Source
const (
// IVDefaultValue 是 IV 的默认值。
IVDefaultValue = "I Love Go Frame!"
)
Variables ¶
This section is empty.
Functions ¶
func PKCS7Padding ¶
PKCS7Padding 对源字节切片应用PKCS#7填充,以匹配给定的块大小。
func PKCS7UnPadding ¶
PKCS7UnPadding 根据给定的块大小,从源字节切片中移除PKCS#7填充。
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.