Versions in this module Expand all Collapse all v2 v2.0.2 Oct 19, 2022 v2.0.1 Oct 19, 2022 Changes in this version + const PKCS5_PADDING + const PKCS7_PADDING + const ZEROS_PADDING + var ErrUnPadding = errors.New("UnPadding error") + func AesCBCDecrypt(src, key, iv []byte, padding string) ([]byte, error) + func AesCBCEncrypt(src, key, iv []byte, padding string) ([]byte, error) + func AesECBDecrypt(src, key []byte, padding string) ([]byte, error) + func AesECBEncrypt(src, key []byte, padding string) ([]byte, error) + func CBCDecrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error) + func CBCEncrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error) + func Des3CBCDecrypt(src, key, iv []byte, padding string) ([]byte, error) + func Des3CBCEncrypt(src, key, iv []byte, padding string) ([]byte, error) + func Des3ECBDecrypt(src, key []byte, padding string) ([]byte, error) + func Des3ECBEncrypt(src, key []byte, padding string) ([]byte, error) + func DesCBCDecrypt(src, key, iv []byte, padding string) ([]byte, error) + func DesCBCEncrypt(src, key, iv []byte, padding string) ([]byte, error) + func DesECBDecrypt(src, key []byte, padding string) ([]byte, error) + func DesECBEncrypt(src, key []byte, padding string) ([]byte, error) + func ECBDecrypt(block cipher.Block, src []byte, padding string) ([]byte, error) + func ECBEncrypt(block cipher.Block, src []byte, padding string) ([]byte, error) + func HmacSha1(key string, data string) []byte + func KeyGenerator(src []byte, blockSize int) []byte + func Md5(str string) []byte + func Md5ToString(str string) string + func NewECBDecrypter(b cipher.Block) cipher.BlockMode + func NewECBEncrypter(b cipher.Block) cipher.BlockMode + func PKCS5Padding(src []byte, blockSize int) []byte + func PKCS5Unpadding(src []byte) ([]byte, error) + func PKCS7Padding(src []byte, blockSize int) []byte + func PKCS7UnPadding(src []byte) ([]byte, error) + func Padding(padding string, src []byte, blockSize int) []byte + func RSADecrypt(src, priKey []byte) ([]byte, error) + func RSAEncrypt(src, pubKey []byte) ([]byte, error) + func RSAGenerateKey(bits int, out io.Writer) error + func RSAGeneratePublicKey(priKey []byte, out io.Writer) error + func RSASign(src []byte, priKey []byte, hash crypto.Hash) ([]byte, error) + func RSAVerify(src, sign, pubKey []byte, hash crypto.Hash) error + func SHA1(data []byte) []byte + func Sha1(str string) []byte + func UnPadding(padding string, src []byte) ([]byte, error) + func ZerosPadding(src []byte, blockSize int) []byte + func ZerosUnPadding(src []byte) ([]byte, error)