util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecryptData

func AESDecryptData(cipherText []byte, aesKey []byte, iv []byte) (rawData []byte, err error)

AESDecryptData 数据解密

func AESDecryptMsg

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

AESDecryptMsg 消息解密 ciphertext = AES_Encrypt[random(16B) + msg_len(4B) + rawXMLMsg + appId]

func AESEncryptMsg

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

AESEncryptMsg 消息加密 ciphertext = AES_Encrypt[random(16B) + msg_len(4B) + rawXMLMsg + appId]

func GetRandString

func GetRandString(length int) string

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

func GetRandStringWithCharset

func GetRandStringWithCharset(length int, charset string) string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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