Skip to content

Commit a691566

Browse files
authored
Merge pull request #116 from bunq/bunq/sdk_csharp#92_fix_key_modulus_length
Fix key generation on .NET Framework. (#92)
2 parents 729f382 + 395d7ef commit a691566

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)