Skip to content

Commit 395d7ef

Browse files
author
Konstantin Yakushev
committed
Fix key generation on .NET Framework. (#92)
1 parent 729f382 commit 395d7ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

BunqSdk/Security/SecurityUtils.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,12 @@ public static RSA CreatePublicKeyFromPublicKeyFormattedString(string publicKeySt
230230
/// </summary>
231231
public static RSA GenerateKeyPair()
232232
{
233+
#if NETSTANDARD2_0 || NET46 || NET45 || NET451 || NET452 || NET40 || NET35
234+
var rsa = (RSA)new RSACryptoServiceProvider(RSA_KEY_SIZE);
235+
#else
233236
var rsa = RSA.Create();
234237
rsa.KeySize = RSA_KEY_SIZE;
235-
238+
#endif
236239
return rsa;
237240
}
238241

0 commit comments

Comments
 (0)