refactor(RSAFactory): Methode CreateEncryptedPrivateKeyPem hinzugefügt, um mit direkt benutzerdefinierten pbeParametern zu erstellen.

- Umbenennung der Methode CreateRSAPrivateKeyPem in CreatePrivateKeyPem
This commit is contained in:
Developer 02
2024-12-13 15:45:09 +01:00
parent d013d3edfa
commit a9ebc406f3
3 changed files with 30 additions and 12 deletions

View File

@@ -16,9 +16,8 @@ namespace DigitalData.Core.Security.Config
private string CreateFileName(params object[] objs) => string.Join(Separator, objs);
private string CreatePem(bool isEncrypted) => isEncrypted
? Instance.RSAFactory.CreateEncryptedPrivateKeyPem(keySizeInBits: KeySizeInBits, password: Secrets.PBE_PASSWORD,
pbeEncryptionAlgorithm: PbeEncryptionAlgorithm, hashAlgorithmName: PbeHashAlgorithmName, iterationCount: PbeIterationCount)
: Instance.RSAFactory.CreateRSAPrivateKeyPem(keySizeInBits: KeySizeInBits);
? Instance.RSAFactory.CreateEncryptedPrivateKeyPem(pbeParameters: PbeParameters, keySizeInBits: KeySizeInBits, password: Secrets.PBE_PASSWORD)
: Instance.RSAFactory.CreatePrivateKeyPem(keySizeInBits: KeySizeInBits);
public override void OnDeserialized()
{