refactor(RSACryptographer): Verzeichnis und Dateiname wurden entfernt.

- Datei-Leseprozess in init-Methode entfernt.
This commit is contained in:
Developer 02
2024-12-13 10:29:49 +01:00
parent 7c03282066
commit 76ce64691a
5 changed files with 16 additions and 73 deletions

View File

@@ -1,5 +1,4 @@
using DigitalData.Core.Abstractions.Security;
using DigitalData.Core.Security.Config;
using DigitalData.Core.Security.Extensions;
namespace DigitalData.Core.Security.Cryptographer
@@ -17,21 +16,5 @@ namespace DigitalData.Core.Security.Cryptographer
base.Init();
RSA.ImportFromPem(base.Pem);
}
public override void FileNotFoundEvent()
{
var new_decryptor = new RSADecryptor()
{
Pem = RSAFactory<RSAFactoryParams>.Static.CreateRSAPrivateKeyPem()
};
_pem = new_decryptor.Encryptor.Pem;
if (PemPath is not null)
Task.Run(async () =>
{
await File.WriteAllTextAsync(_pem, PemPath);
});
}
}
}