refactor(Core.Security): Implementierung der entsprechenden Schnittstellen zu RSACryptographer, RSADecryptor und RSAEncryptor.

This commit is contained in:
Developer 02
2024-11-18 11:04:24 +01:00
parent 51ebf3fa67
commit 0bb779b7b6
4 changed files with 12 additions and 8 deletions

View File

@@ -1,19 +1,20 @@
using DigitalData.Core.Security.Extensions;
using DigitalData.Core.Abstractions.Security;
using DigitalData.Core.Security.Extensions;
namespace DigitalData.Core.Security
{
public class RSADecryptor : RSACryptographer
public class RSADecryptor : RSACryptographer, IRSADecryptor, IRSACryptographer
{
public required string PrivateKeyPem
{
init => _rsa.ImportFromPem(value);
}
public RSAEncryptor Encryptor
public IRSAEncryptor Encryptor
{
get
{
return new ()
return new RSAEncryptor()
{
PublicKeyPem = _rsa.ExportRSAPublicKeyPem(),
Padding = Padding