util

package
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecryptMsg

func AESDecryptMsg(base64CipherText string, encodingAESKey string) (random, rawXMLMsg, appId []byte, err error)

AESDecryptMsg 消息解密 encrypt = Base64_Encode(AES_Encrypt[random(16B) + msg_len(4B) + msg + $key])

func AESEncryptMsg

func AESEncryptMsg(random, rawXMLMsg []byte, appId string, encodingAESKey string) (ciphertext string)

AESEncryptMsg 消息加密 encrypt = Base64_Encode(AES_Encrypt[random(16B) + msg_len(4B) + msg + $key])

func GetRandString

func GetRandString(length int) string

GetRandString 获取指定长度的随机字符串

func GetRandStringWithCharset

func GetRandStringWithCharset(length int, charset string) string

GetRandStringWithCharset 获取指定字符集 下 指定长度的随机字符串

func Signature

func Signature(data, secret string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL