接入指南
加密与解密指南
签名、验签和敏感字段加密的处理说明。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
签名、验签和敏感字段加密的处理说明。
openssl genrsa -out private_pkcs1.pem 2048
openssl pkcs8 -topk8 -inform PEM -in private_pkcs1.pem -out private_pkcs8.pem -nocrypt
openssl rsa -in private_pkcs8.pem -pubout -out public_pkcs8.pem
S1 = request.body
bytes = SHA256withRSA(S1, private_pkcs8)
sign = BASE64(bytes)
Authorization = sign
Authorization: BASE64_SIGNATURE
Content-Type: application/json
| 建议 | 说明 |
|---|---|
| 私钥保存 | 私钥只保存在商户服务端安全配置或密钥管理系统中 |
| 环境隔离 | 测试和生产环境使用不同密钥 |
| 回调地址 | 在 API KEY 配置中填写可公网访问的 HTTPS 回调地址 |
| 签名失败 | 不处理业务数据,不返回过多内部细节 |
