refactor(RSACryptographer): Verzeichnis und Dateiname wurden entfernt.
- Datei-Leseprozess in init-Methode entfernt.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Security;
|
||||
using DigitalData.Core.Security.Config;
|
||||
using DigitalData.Core.Security.Extensions;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
@@ -34,22 +33,5 @@ namespace DigitalData.Core.Security.Cryptographer
|
||||
else
|
||||
RSA.ImportFromPem(Pem);
|
||||
}
|
||||
|
||||
public override void FileNotFoundEvent()
|
||||
{
|
||||
var new_decryptor = new RSADecryptor()
|
||||
{
|
||||
Pem = RSAFactory<RSAFactoryParams>.Static.CreateRSAPrivateKeyPem(),
|
||||
Encrypt = Encrypt
|
||||
};
|
||||
|
||||
_pem = new_decryptor.Pem;
|
||||
|
||||
if (PemPath is not null)
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await File.WriteAllTextAsync(_pem, PemPath);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user