From ae657a685d3ed883b2ea7c34712905797670b8c7 Mon Sep 17 00:00:00 2001 From: Roc Date: Thu, 5 Dec 2024 15:02:17 +0800 Subject: [PATCH] =?UTF-8?q?[WeChatPay.V3]=20=E4=BF=AE=E6=AD=A3=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E5=AD=97=E6=AE=B5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs b/src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs index 15f51bb2c..ce82edb7a 100644 --- a/src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs +++ b/src/Essensoft.Paylink.Security/OaepSHA1WithRSA.cs @@ -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)); } }