feat(tenpayv2): 升级公共组件

This commit is contained in:
Fu Diwei
2024-01-30 23:01:06 +08:00
committed by RHQYZ
parent a6763ca683
commit bf39f8dd83
121 changed files with 1350 additions and 1691 deletions

View File

@@ -17,8 +17,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Utilities
/// <returns>解密后的数据字节数组。</returns>
public static byte[] DecryptWithECB(byte[] keyBytes, byte[] cipherBytes)
{
if (keyBytes == null) throw new ArgumentNullException(nameof(keyBytes));
if (cipherBytes == null) throw new ArgumentNullException(nameof(cipherBytes));
if (keyBytes is null) throw new ArgumentNullException(nameof(keyBytes));
if (cipherBytes is null) throw new ArgumentNullException(nameof(cipherBytes));
using (SymmetricAlgorithm aes = Aes.Create())
{
@@ -39,8 +39,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Utilities
/// <returns>解密后的文本数据。</returns>
public static string DecryptWithECB(string encodingKey, string encodingCipherText)
{
if (encodingKey == null) throw new ArgumentNullException(nameof(encodingKey));
if (encodingCipherText == null) throw new ArgumentNullException(nameof(encodingCipherText));
if (encodingKey is null) throw new ArgumentNullException(nameof(encodingKey));
if (encodingCipherText is null) throw new ArgumentNullException(nameof(encodingCipherText));
byte[] plainBytes = DecryptWithECB(
keyBytes: Convert.FromBase64String(encodingKey),