Versions in this module Expand all Collapse all v1 v1.2.2 Mar 25, 2020 Changes in this version + const DefaultRSAPrivateKey + const DefaultRSAPublicKeyExponent + const DefaultRSAPublicKeyModulus + func Aes128CBCDecrypt(key [16]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes128CBCEncrypt(key [16]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes128CFBDecrypt(key [16]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes128CFBEncrypt(key [16]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes128CTRDecrypt(key [16]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes128CTREncrypt(key [16]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes128ECBDecrypt(key [16]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes128ECBEncrypt(key [16]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes128OFBDecrypt(key [16]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes128OFBEncrypt(key [16]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes192CBCDecrypt(key [24]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes192CBCEncrypt(key [24]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes192CFBDecrypt(key [24]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes192CFBEncrypt(key [24]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes192CTRDecrypt(key [24]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes192CTREncrypt(key [24]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes192ECBDecrypt(key [24]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes192ECBEncrypt(key [24]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes192OFBDecrypt(key [24]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes192OFBEncrypt(key [24]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes256CBCDecrypt(key [32]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes256CBCEncrypt(key [32]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes256CFBDecrypt(key [32]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes256CFBEncrypt(key [32]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes256CTRDecrypt(key [32]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes256CTREncrypt(key [32]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Aes256ECBDecrypt(key [32]byte, ciphertext []byte) (plaintext []byte, err error) + func Aes256ECBEncrypt(key [32]byte, plaintext []byte) (ciphertext []byte, err error) + func Aes256OFBDecrypt(key [32]byte, cipherReader io.Reader) (plainReader io.Reader, err error) + func Aes256OFBEncrypt(key [32]byte, plainReader io.Reader) (cipherReader io.Reader, err error) + func Base64Decode(raw []byte) []byte + func Base64Encode(raw []byte) []byte + func BytesReverse(b []byte) []byte + func Convert16bytes(b []byte) (b16 [16]byte) + func Convert24bytes(b []byte) (b24 [24]byte) + func Convert32bytes(b []byte) (b32 [32]byte) + func DESCBCDecrypt3(ciphertext, key, iv []byte) (plaintext []byte, err error) + func DESCBCEncrypt3(plaintext, key, iv []byte) (ciphertext []byte, err error) + func GZIPCompress(src io.Reader, writeTo io.Writer) (err error) + func GZIPCompressFile(filePath string) (err error) + func GZIPUncompress(src io.Reader, writeTo io.Writer) (err error) + func GZIPUnompressFile(filePath string) (err error) + func HmacMD5(key, origData []byte) (sum []byte) + func HmacSHA1(key, origData []byte) (sum []byte) + func HmacSHA256(key, origData []byte) (sum []byte) + func HmacSHA512(key, origData []byte) (sum []byte) + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(plaintext []byte) []byte + func RSADecryptNoPadding(rsaPrivateKey string, ciphertext []byte) ([]byte, error) + func RSAEncryptNoPadding(rsaPublicKeyModulus string, rsaPublicKeyExponent int64, origData []byte) (ciphertext []byte, err error) + func RSAEncryptOfWapBaidu(rsaPublicKeyModulus string, origData []byte) (string, error) + func StringReverse(s string) string + type AesMode int + const AesCBC + const AesCFB + const AesCTR + const AesECB + const AesOFB