Documentation
¶
Index ¶
- func AesCbcPkcs5Decrypt(cipherData string, keyStr string) (plainText string, err error)
- func AesCbcPkcs5Encrypt(originData string, keyStr string) (encryptText string, err error)
- func AesEbcPkcs7Encrypt(plainText []byte, key string) (cipherText []byte, err error)
- func HmacSHA1(plainText string, key string) string
- func MD5(plainText string) string
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func PKCSPadding(plainText []byte, blockSize int) []byte
- func PKCSUnPadding(cipherText []byte) []byte
- func SHA1(plainText string) string
- type ECB
- type EcbDecrypter
- type EcbEncrypter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesCbcPkcs5Decrypt ¶
AES/CBC/PKCS5模式解密
func AesCbcPkcs5Encrypt ¶
AES/CBC/PKCS5模式加密
func AesEbcPkcs7Encrypt ¶
AES/ECB/PKCS7模式加密
func PKCSPadding ¶
PKCS填充(PKCS5和PKCS7的算法一样,只是填充字段多少的区别)
func PKCSUnPadding ¶
PKCS反填充(PKCS5和PKCS7的算法一样,只是填充字段多少的区别)
Types ¶
type EcbDecrypter ¶
type EcbDecrypter ECB
ECB解密部分
func (*EcbDecrypter) BlockSize ¶
func (x *EcbDecrypter) BlockSize() int
func (*EcbDecrypter) CryptBlocks ¶
func (x *EcbDecrypter) CryptBlocks(dst, src []byte)
type EcbEncrypter ¶
type EcbEncrypter ECB
ECB加密部分
func (*EcbEncrypter) BlockSize ¶
func (x *EcbEncrypter) BlockSize() int
func (*EcbEncrypter) CryptBlocks ¶
func (x *EcbEncrypter) CryptBlocks(dst, src []byte)
Click to show internal directories.
Click to hide internal directories.