Documentation ¶
Index ¶
- Constants
- func AesDecrypt(dst, key []byte) ([]byte, error)
- func AesEncrypt(dst, key []byte) ([]byte, error)
- func CheckSignature(result, secret string, body []byte) bool
- func CreateAuthMap(key, secret, stringToSign string) map[string]string
- func DecodeBase64(src []byte) ([]byte, error)
- func DecodeBase64String(src string) (string, error)
- func Decrypt(ciphertext []byte, key []byte) ([]byte, error)
- func DesBase64Decrypt(dst, key, vector []byte) ([]byte, error)
- func DesBase64Encrypt(dst, key, vector []byte) ([]byte, error)
- func EncodeBase64(src []byte) []byte
- func Encrypt(origData []byte, key []byte) ([]byte, error)
- func GetMD5(src string, short bool) string
- func GetMD5WithoutAny(src string, short bool) string
- func GetSha1(data string) string
- func GetSha256(data string) string
- func GetSha512(data string) string
- func HmacBase64Bytes(toSign, secret []byte) []byte
- func HmacBytes(toSign, secret []byte) []byte
- func HmacSignature(toSign, secret string) string
- func Md5Signature(body []byte) string
- func PKCS5Padding(ciphertext []byte, size int) []byte
- func PKCS5UnPadding(dst []byte) []byte
- func ParseKey(key []byte, kind int) (interface{}, error)
- type SHAwithRSA
Constants ¶
View Source
const ( RSA_PRIVATE_KEY = iota RSA_PUBLIC_KEY RSA_CERT )
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func CheckSignature ¶
func CreateAuthMap ¶
func DecodeBase64 ¶
func DecodeBase64String ¶
func DesBase64Decrypt ¶
func DesBase64Encrypt ¶
func EncodeBase64 ¶
func GetMD5WithoutAny ¶
func HmacBase64Bytes ¶
func HmacSignature ¶
func Md5Signature ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
type SHAwithRSA ¶
type SHAwithRSA struct {
// contains filtered or unexported fields
}
func NewSHAwithRSA ¶
func NewSHAwithRSA() *SHAwithRSA
Click to show internal directories.
Click to hide internal directories.