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)); } }