refactor(Instance): removed.

- Moved statc RSAFactory instance to RSAFactory
This commit is contained in:
Developer 02
2025-03-14 10:08:33 +01:00
parent 8498dc0456
commit 973a5f1023
4 changed files with 5 additions and 16 deletions

View File

@@ -6,6 +6,8 @@ namespace DigitalData.Core.Security.RSAKey;
public class RSAFactory : IAsymmetricKeyFactory
{
public static readonly RSAFactory Static = new();
public string CreatePrivateKeyPem(int? keySizeInBits = null, bool encrypt = false) => encrypt
? CreateEncryptedPrivateKeyPem(keySizeInBits: keySizeInBits)
: RSA.Create(keySizeInBits ?? RSAFactoryParams.Default.KeySizeInBits).ExportRSAPrivateKeyPem();