Documentation
¶
Index ¶
- Constants
- func AESDecode(crypt, iv, key string) string
- func AESEncode(src, iv, key string) string
- func Base64Decode(src string) string
- func Base64Encode(src string) string
- func Base64Sha256(src, key string) string
- func FormatPrivateKey(privateKey string) string
- func FormatQuery(input map[string]interface{}) (concat string)
- func HMAC_SHA1(src, key string) string
- func HMAC_SHA256(src, key string) string
- func HMAC_SHA512(src, key string) string
- func HexMD5(content string) string
- func MD5(str string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5Trimming(encrypt []byte) []byte
- func RsaEncrypt(src, key string) string
- func SHA1(src string) string
- func SHA256(src string) string
- func SHA256WithKey(src string, privateKey string) string
- func SHA512(src string) string
- func Sign(input map[string]interface{}, secretKey string) (sign string, concat string)
Constants ¶
View Source
const ( // PEMBEGIN 私钥 PEMBEGIN 开头 PEMBEGIN = "-----BEGIN RSA PRIVATE KEY-----\n" // PEMEND 私钥 PEMEND 结尾 PEMEND = "\n-----END RSA PRIVATE KEY-----" // PUBPEMBEGIN 公钥 PEMBEGIN 开头 PUBPEMBEGIN = "-----BEGIN PUBLIC KEY-----\n" // PUBPEMEND 公钥 PEMEND 结尾 PUBPEMEND = "\n-----END PUBLIC KEY-----" )
Variables ¶
This section is empty.
Functions ¶
func FormatQuery ¶
func PKCS5Padding ¶
func PKCS5Trimming ¶
func RsaEncrypt ¶
func SHA256WithKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.