Documentation ¶
Overview ¶
aes.go
des.go
md5.go
padding.go
rsa.go
sha1.go
Index ¶
- func AesCBCDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func AesCBCEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func AesCFBDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func AesCFBEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func AesECBDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func AesECBEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func DesCBCDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func DesCBCEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func DesCFBDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func DesCFBEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func GenRsaKey(bits int, pemFile ...string) error
- func Hmac(s string, key string) string
- func Md5(key string) string
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func RSADecrypt(data []byte, privatePem ...string) ([]byte, error)
- func RSAEncrypt(data []byte, publicPem ...string) ([]byte, error)
- func SetAesKey(key string) (err error)
- func SetDesKey(key string) error
- func Sha1(key string) string
- func Sha256(key string) string
- func Sha512(key string) string
- func TripleDesCBCDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func TripleDesCBCEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func TripleDesCFBDecrypt(ciphertext []byte, paddingType ...string) (plaintext []byte, err error)
- func TripleDesCFBEncrypt(plaintext []byte, paddingType ...string) (ciphertext []byte, err error)
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesCBCDecrypt ¶
func AesCBCEncrypt ¶
func AesCFBDecrypt ¶
func AesCFBEncrypt ¶
func AesECBDecrypt ¶
func AesECBEncrypt ¶
func DesCBCDecrypt ¶
func DesCBCEncrypt ¶
func DesCFBDecrypt ¶
func DesCFBEncrypt ¶
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func TripleDesCBCDecrypt ¶
3DES解密
func TripleDesCBCEncrypt ¶
3DES加密
func TripleDesCFBDecrypt ¶
3DES解密
func TripleDesCFBEncrypt ¶
3DES加密
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.