docs: 完善文档

This commit is contained in:
Fu Diwei
2023-04-11 15:42:49 +08:00
parent 7f214e170c
commit 78a679001c
5 changed files with 101 additions and 34 deletions

View File

@@ -4,7 +4,7 @@
### 解密流程
对于部分接口响应返回的敏感信息,腾讯微企付可能会需要使用以下方式进行解密:
对于部分接口响应返回的敏感信息,微企付可能会需要使用以下方式进行解密:
- 使用平台私钥基于 RSAES-OAEP + SM4 算法解密。
@@ -23,8 +23,8 @@ string plainText = SM4Utility.DecryptWithCBC(sm4Key, sm4IV, cipherText);
此外,本库还封装了直接解密响应中敏感信息字段的扩展方法,下面给出一个示例代码:
```csharp
var request = new GetMSEPayPaymentByPaymentIdRequest();
var response = await client.ExecuteGetMSEPayPaymentByPaymentIdAsync(request);
var request = new GetPaymentByPaymentIdRequest();
var response = await client.ExecuteGetPaymentByPaymentIdAsync(request);
Console.WriteLine("before: {0}", response.Payee.EnterpriseName); // 此时仍是密文
client.DecryptResponseSensitiveProperty(response);