Documentation
¶
Index ¶
- Variables
- func Decrypt(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func DecryptCBC(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func DecryptCFB(cipherText []byte, key []byte, unPadding int, iv ...[]byte) ([]byte, error)
- func Encrypt(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func EncryptCBC(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)
- func EncryptCFB(plainText []byte, key []byte, padding *int, iv ...[]byte) ([]byte, error)
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte, blockSize int) ([]byte, error)
- func ZeroPadding(cipherText []byte, blockSize int) ([]byte, int)
- func ZeroUnPadding(plaintext []byte, unPadding int) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var (
IVDefaultValue = "Hello, world!"
)
Functions ¶
func DecryptCBC ¶
key 必须是16/24/32 位长
func DecryptCFB ¶
key 必须是16/24/32 位长
func EncryptCBC ¶
key 必须是16/24/32 位长
func EncryptCFB ¶
key 必须是16/24/32 位长
func PKCS5Padding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.