Skip to content

Commit

Permalink
[WeChatPay.V3] 修正加密字段报错
Browse files Browse the repository at this point in the history
  • Loading branch information
roc916 committed Dec 5, 2024
1 parent 48aa9a4 commit ae657a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static string Encrypt(string data, string publicKey)

using (var rsa = RSA.Create())
{
rsa.ImportRSAPublicKey(Convert.FromBase64String(publicKey), out var _);
rsa.ImportSubjectPublicKeyInfo(Convert.FromBase64String(publicKey), out var _);
return Convert.ToBase64String(rsa.Encrypt(Encoding.UTF8.GetBytes(data), RSAEncryptionPadding.OaepSHA1));
}
}
Expand Down

0 comments on commit ae657a6

Please sign in to comment.