refactor: KeyType entfernt
This commit is contained in:
parent
506685a0b5
commit
aa9951f242
@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Security;
|
||||
using DigitalData.Core.Security.DigitalData.Core.Security;
|
||||
using DigitalData.Core.Security.Extensions;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
@ -32,8 +31,6 @@ namespace DigitalData.Core.Security
|
||||
|
||||
protected override RSA RSA => lazyRSA.Value;
|
||||
|
||||
public override CryptKeyType KeyType => IsEncrypted ? CryptKeyType.EncryptedPrivate : CryptKeyType.Private;
|
||||
|
||||
public RSADecryptor()
|
||||
{
|
||||
_lazyEncryptor = new(() => new RSAEncryptor()
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Security;
|
||||
using DigitalData.Core.Security.DigitalData.Core.Security;
|
||||
using DigitalData.Core.Security.Extensions;
|
||||
|
||||
namespace DigitalData.Core.Security
|
||||
@ -16,8 +15,6 @@ namespace DigitalData.Core.Security
|
||||
}
|
||||
}
|
||||
|
||||
public override CryptKeyType KeyType => CryptKeyType.Public;
|
||||
|
||||
public byte[] Encrypt(byte[] data) => RSA.Encrypt(data, Padding);
|
||||
|
||||
public string Encrypt(string data) => RSA.Encrypt(data.Base64ToByte(), Padding).BytesToString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user