Versions in this module Expand all Collapse all v2 v2.0.2 Jun 9, 2023 Changes in this version + const IVDefaultValue + var ErrorCipherTextInvalid = fmt.Errorf("cipherText is not a multiple of the block size") + var ErrorCipherTextTooShort = fmt.Errorf("cipherText too short") + var ErrorInvalidBlockLen = fmt.Errorf("invalid blocklen") + var ErrorInvalidDataLen = fmt.Errorf("invalid data len") + var ErrorInvalidPadding = fmt.Errorf("invalid padding") + 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 Other modules containing this package github.com/aronlt/toolkit