Refactor(Core.Security): Getrennte Pem-Eigenschaften für öffentliche und private Schlüssel wurden entfernt.
- Pem-Eigenschaft in der Hauptklasse RSACryptographer erstellt
This commit is contained in:
@@ -5,10 +5,9 @@ namespace DigitalData.Core.Security
|
||||
{
|
||||
public class RSAEncryptor : RSACryptographer, IRSAEncryptor, IRSACryptographer
|
||||
{
|
||||
public required string PublicKeyPem
|
||||
public RSAEncryptor()
|
||||
{
|
||||
get => _rsa.ExportRSAPublicKeyPem();
|
||||
init => _rsa.ImportFromPem(value);
|
||||
_rsa.ImportFromPem(Pem);
|
||||
}
|
||||
|
||||
public byte[] Encrypt(byte[] data) => _rsa.Encrypt(data, Padding);
|
||||
|
||||
Reference in New Issue
Block a user