Documentation ¶
Index ¶
- Constants
- Variables
- func BuildQuery(params map[string]string) string
- func DecryptBase64(data string) []byte
- func DecryptRSA(data []byte) []byte
- func Encrypt(query string) (string, error)
- func EncryptBase64(data []byte) string
- func EncryptMD5(data []byte) []byte
- func EncryptRSA(data []byte) []byte
- func EncryptSHA(data []byte) []byte
- func EncrytQuery(query string, appId string) (string, error)
- func HttpPost(client *http.Client, url string, content string, charset string) (string, error)
- func Sign(query string) string
- func SignRSA(raw []byte, algorithm crypto.Hash) []byte
- func VerifySignature(raw []byte, signature string, algorithm crypto.Hash) bool
Constants ¶
View Source
const ( AppId = "" GatewayUrl = "" APIVersion = "" )
Variables ¶
View Source
var EncryptionFailed error = errors.New("encryption failed")
Functions ¶
func BuildQuery ¶
func DecryptBase64 ¶
DecryptBase64 decrypt given string with Base64 algorithm
func DecryptRSA ¶
DecryptRSA decrypt given []byte with RSA algorithm
func EncryptBase64 ¶
EncryptBase64 encrypt given []byte with Base64 algorithm
func EncryptMD5 ¶
EncryptMD5 encrypt given []byte with MD5 algorithm
func EncryptRSA ¶
EncryptRSA encrypt given data with RSA algorithm
func EncryptSHA ¶
EncryptSHA encrypt given []byte with SHA algorithm
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.