common

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSignStr added in v1.2.41

func BuildSignStr(bm g.Map) (string, error)

BuildSignStr 根据传入的g.Map构建签名字符串 规则:对所有非空值的键进行字母排序后,按"key=value&"格式拼接,最后去除末尾的"&" 参数 bm: 包含键值对的g.Map 返回值: 构建好的签名字符串和可能的错误

func FormatPublicKey

func FormatPublicKey(publicKey string) (pKey string)

FormatPublicKey 将原始公钥字符串格式化为标准PEM格式的公钥 功能:为原始公钥添加PEM头部和尾部,并按64字符长度拆分换行,符合PKCS#8标准格式要求 参数 publicKey: 原始未格式化的公钥字符串(通常为Base64编码且无换行) 返回值: 格式化后的PEM格式公钥字符串

func ParseNotifyToBodyMap added in v1.2.41

func ParseNotifyToBodyMap(req *http.Request) (bm map[string]interface{}, err error)

ParseNotifyToBodyMap 将HTTP请求中的表单数据解析为键值对映射 功能:解析请求表单数据,提取单值字段并转换为map[string]interface{}格式 参数 req: 包含表单数据的HTTP请求对象 返回值: 解析后的键值对映射(bm)和可能的错误(err)

Types

This section is empty.

Jump to

Keyboard shortcuts

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