Refactor(RSACryptographer): Entfernte Pem initter Methode.
- PrivateKeyPem initter Methode zu RSADecryptor hinzugefügt. - PublicKeyPem getter und initter Methoden zu RSAEncryptor hinzugefügt.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DigitalData.Core.Security
|
||||
namespace DigitalData.Core.Security
|
||||
{
|
||||
public class RSADecryptor : RSACryptographer
|
||||
{
|
||||
public required string PrivateKeyPem
|
||||
{
|
||||
init => _rsa.ImportFromPem(value);
|
||||
}
|
||||
|
||||
public string PublicKeyPem => _rsa.ExportRSAPublicKeyPem();
|
||||
|
||||
public RSAEncryptor Encryptor
|
||||
@@ -12,7 +15,7 @@ namespace DigitalData.Core.Security
|
||||
{
|
||||
return new ()
|
||||
{
|
||||
Pem = PublicKeyPem,
|
||||
PublicKeyPem = PublicKeyPem,
|
||||
Padding = Padding
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user