Skip to content

Commit

Permalink
refactor: use a 2048 bits key for Linux and MacOs platforms (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr00d authored Sep 14, 2023
1 parent 2bfc4e1 commit a89f6b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Vonage/PemParse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static RSA DecodePEMKey(string pemstr)
if (!(isPkcs1 || isPkcs8))
{
logger.LogError("App private key is not in PKCS#1 or PKCS#8 format!");

return null;
}

Expand Down Expand Up @@ -259,7 +259,7 @@ public static RSA DecodeRSAPrivateKey(byte[] privkey, bool isPkcs8)
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
RSA = new RSACryptoServiceProvider();
RSA = new RSACryptoServiceProvider(2048);
}
else
{
Expand Down Expand Up @@ -306,7 +306,7 @@ private static int GetIntegerSize(BinaryReader binr)
{
highbyte = binr.ReadByte(); // data size in next 2 bytes
lowbyte = binr.ReadByte();
byte[] modint = {lowbyte, highbyte, 0x00, 0x00};
byte[] modint = { lowbyte, highbyte, 0x00, 0x00 };
count = BitConverter.ToInt32(modint, 0);
}
else
Expand Down

0 comments on commit a89f6b4

Please sign in to comment.