Documentation ¶
Overview ¶
提供一些实用函数
Index ¶
- func AESDecryptData(cipherText []byte, aesKey []byte, iv []byte) (rawData []byte, err error)
- func AESDecryptMsg(ciphertext []byte, aesKey []byte) (random, rawXMLMsg, appId []byte, err error)
- func AESEncryptMsg(random, rawXMLMsg []byte, appId string, aesKey []byte) (ciphertext []byte)
- func BoolPtr(v bool) *bool
- func Float32Ptr(v float32) *float32
- func Float64Ptr(v float64) *float64
- func Int32Ptr(v int32) *int32
- func Int64Ptr(v int64) *int64
- func IntPtr(v int) *int
- func MsgSign(token, timestamp, nonce, encryptedMsg string) (signature string)
- func Sign(token, timestamp, nonce string) (signature string)
- func StringPtr(v string) *string
- func ToLower(s string) string
- func Uint32Ptr(v uint32) *uint32
- func Uint64Ptr(v uint64) *uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecryptData ¶
func AESDecryptMsg ¶
ciphertext = AES_Encrypt[random(16B) + msg_len(4B) + rawXMLMsg + appId]
func AESEncryptMsg ¶
ciphertext = AES_Encrypt[random(16B) + msg_len(4B) + rawXMLMsg + appId]
func BoolPtr ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func Float32Ptr ¶
Float32 is a helper routine that allocates a new float32 value to store v and returns a pointer to it.
func Float64Ptr ¶
Float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
func Int32Ptr ¶
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
func Int64Ptr ¶
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
func IntPtr ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
func StringPtr ¶
String is a helper routine that allocates a new string value to store v and returns a pointer to it.
Types ¶
This section is empty.