refactor(IRSAEncryptor): umbenannt in IAsymmetricPublicKey
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace DigitalData.Core.Security.Cryptographer
|
||||
{
|
||||
public class RSAEncryptor : RSAKeyBase, IRSAEncryptor, IAsymmetricKey
|
||||
public class RSAEncryptor : RSAKeyBase, IAsymmetricPublicKey, IAsymmetricKey
|
||||
{
|
||||
public override string Pem
|
||||
{
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace DigitalData.Core.Security.Cryptographer
|
||||
|
||||
public bool IsEncrypted { get; init; }
|
||||
|
||||
private readonly Lazy<IRSAEncryptor> _lazyEncryptor;
|
||||
private readonly Lazy<IAsymmetricPublicKey> _lazyPublicKey;
|
||||
|
||||
public IRSAEncryptor Encryptor => _lazyEncryptor.Value;
|
||||
public IAsymmetricPublicKey PublicKey => _lazyPublicKey.Value;
|
||||
|
||||
public RSAPrivateKey()
|
||||
{
|
||||
_lazyEncryptor = new(() => new RSAEncryptor()
|
||||
_lazyPublicKey = new(() => new RSAEncryptor()
|
||||
{
|
||||
Pem = RSA.ExportRSAPublicKeyPem(),
|
||||
Padding = Padding
|
||||
|
||||
Reference in New Issue
Block a user