Documentation ¶
Index ¶
- Constants
- func AesCBCPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func AesCBCPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func AesCFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func AesCFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func AesCTRPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func AesCTRPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func AesECBPkcs7Decrypt(src, key []byte) ([]byte, error)
- func AesECBPkcs7Encrypt(data, key []byte) ([]byte, error)
- func AesOFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func AesOFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func AnsiX923Padding(plaintext []byte, blockSize int) []byte
- func AnsiX923UnPadding(ciphertext []byte, blockSize int) []byte
- func Base64Decode(s string) ([]byte, error)
- func Base64Encode(src []byte) string
- func Decrypt(multiple cryptoType, cipherText, key, iv []byte, mode mode, padding padding) ([]byte, error)
- func DesCBCPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func DesCFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func DesCFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func DesCTRPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func DesCTRPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func DesECBPkcs7Decrypt(src, key []byte) ([]byte, error)
- func DesECBPkcs7Encrypt(data, key []byte) ([]byte, error)
- func DesOFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func DesOFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func DescCBCPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func EasyDecrypt(easyType, cipherText, key, iv string) (string, error)
- func EasyEncrypt(easyType, plainText, key, iv string) (string, error)
- func EncodeURIComponent(str string) string
- func Encrypt(multiple cryptoType, plainText, key, iv []byte, mode mode, padding padding) ([]byte, error)
- func HexDecode(s string) ([]byte, error)
- func HexEncode(src []byte) string
- func ISO10126Padding(plaintext []byte, blockSize int) []byte
- func ISO10126UnPadding(ciphertext []byte, blockSize int) []byte
- func ISO97971Padding(plaintext []byte, blockSize int) []byte
- func ISO97971UnPadding(ciphertext []byte, blockSize int) []byte
- func Pkcs5Padding(text []byte) []byte
- func Pkcs5UnPadding(src []byte) []byte
- func Pkcs7Padding(text []byte, blockSize int) []byte
- func Pkcs7UnPadding(src []byte) []byte
- func TripleDesCBCPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func TripleDesCBCPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func TripleDesCFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func TripleDesCFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func TripleDesCTRPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func TripleDesCTRPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func TripleDesECBPkcs7Decrypt(src, key []byte) ([]byte, error)
- func TripleDesECBPkcs7Encrypt(data, key []byte) ([]byte, error)
- func TripleDesOFBPkcs7Decrypt(src, key, iv []byte) ([]byte, error)
- func TripleDesOFBPkcs7Encrypt(data, key, iv []byte) ([]byte, error)
- func ZeroPadding(text []byte, blockSize int) []byte
- func ZeroUnPadding(src []byte) []byte
Constants ¶
View Source
const ( Aes cryptoType = iota Des TriDes )
View Source
const ( ECB mode = iota CBC CFB OFB CTR )
View Source
const ( No padding = iota Zero Pkcs5 Pkcs7 ISO10126 ISO97971 AnsiX923 )
View Source
const ( Base64 transcode = iota Hex )
Variables ¶
This section is empty.
Functions ¶
func AesCBCPkcs7Decrypt ¶
func AesCBCPkcs7Encrypt ¶
func AesCFBPkcs7Decrypt ¶
func AesCFBPkcs7Encrypt ¶
func AesCTRPkcs7Decrypt ¶
func AesCTRPkcs7Encrypt ¶
func AesECBPkcs7Decrypt ¶
ECB 模式解密 src密文,key加密时的密钥
func AesECBPkcs7Encrypt ¶
Ecb加密模式 data要加密的数据,key要加密的密钥
func AesOFBPkcs7Decrypt ¶
func AesOFBPkcs7Encrypt ¶
func AnsiX923Padding ¶
ANSIX923 padding
func AnsiX923UnPadding ¶
func Base64Decode ¶
func Base64Encode ¶
func DesCBCPkcs7Encrypt ¶
func DesCFBPkcs7Decrypt ¶
func DesCFBPkcs7Encrypt ¶
func DesCTRPkcs7Decrypt ¶
func DesCTRPkcs7Encrypt ¶
func DesECBPkcs7Decrypt ¶
ECB 模式解密 src密文,key加密时的密钥
func DesECBPkcs7Encrypt ¶
Ecb加密模式 data要加密的数据,key要加密的密钥
func DesOFBPkcs7Decrypt ¶
func DesOFBPkcs7Encrypt ¶
func DescCBCPkcs7Decrypt ¶
func EasyDecrypt ¶
func EasyEncrypt ¶
easyType:cryptoType/mode/padding/transcode
func EncodeURIComponent ¶
func ISO10126Padding ¶
ISO10126 implements ISO 10126 byte padding. This has been withdrawn in 2007.
func ISO10126UnPadding ¶
func ISO97971Padding ¶
ISO97971 Padding Method 2
func ISO97971UnPadding ¶
func Pkcs5UnPadding ¶
func Pkcs7UnPadding ¶
func TripleDesECBPkcs7Decrypt ¶
ECB 模式解密 src密文,key加密时的密钥
func TripleDesECBPkcs7Encrypt ¶
Ecb加密模式 data要加密的数据,key要加密的密钥
func ZeroUnPadding ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.