Documentation ¶
Index ¶
- func AesDecrypt(src, key []byte) (dst []byte, err error)
- func AesEncrypt(src []byte, key []byte) ([]byte, error)
- func Base64Decode(src string) string
- func Base64Encode(src []byte) string
- func DesDecrypt(data, key []byte) ([]byte, error)
- func DesEncrypt(data, key []byte) ([]byte, error)
- func MD5(s string, isUpper bool) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func PKCS7Pad(msg []byte, blockSize int) []byte
- func PKCS7UnPad(msg []byte) []byte
- func RSADecrypt(data, privateKey []byte) ([]byte, error)
- func RSAEncrypt(data, publicKey []byte) ([]byte, error)
- func RSAPublicKey(path string) (string, error)
- func RSAPublicKeyOrigin(path string) (string, error)
- func SHA1(s string, isUpper bool) string
- func SHA512(s string) string
- func SignHMAC(params []*Param, secret string) string
- type Param
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt AES-CBC解密,PKCS#7,传入密文和密钥,[]byte
func AesEncrypt ¶
AesEncrypt AES-CBC加密+PKCS#7打包,传入明文和密钥
func RSAPublicKeyOrigin ¶
RSAPublicKeyOrigin ...
Types ¶
Click to show internal directories.
Click to hide internal directories.