refactor(RSADecryptor): umbenennen in RSAPrivateKey
This commit is contained in:
@@ -40,9 +40,9 @@ namespace DigitalData.Core.Security.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string DateTagFormat { get; init; } = "MM//2";
|
public string DateTagFormat { get; init; } = "MM//2";
|
||||||
|
|
||||||
public IEnumerable<RSADecryptor> PrivateKeys { get; init; } = new List<RSADecryptor>();
|
public IEnumerable<RSAPrivateKey> PrivateKeys { get; init; } = new List<RSAPrivateKey>();
|
||||||
|
|
||||||
public RSADecryptor? Vault { get; init; }
|
public RSAPrivateKey? VaultPrivateKey { get; init; }
|
||||||
|
|
||||||
public AsymCryptParams()
|
public AsymCryptParams()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace DigitalData.Core.Security.Cryptographer
|
|||||||
return new string(pemChars);
|
return new string(pemChars);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IAsymmetricPrivateKey CreatePrivateKey(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null) => new RSADecryptor()
|
public IAsymmetricPrivateKey CreatePrivateKey(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null) => new RSAPrivateKey()
|
||||||
{
|
{
|
||||||
Pem = pem,
|
Pem = pem,
|
||||||
Issuer = issuer ?? string.Empty,
|
Issuer = issuer ?? string.Empty,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Security.Cryptography;
|
|||||||
|
|
||||||
namespace DigitalData.Core.Security.Cryptographer
|
namespace DigitalData.Core.Security.Cryptographer
|
||||||
{
|
{
|
||||||
public class RSADecryptor : RSAKeyBase, IAsymmetricPrivateKey, IAsymmetricKey
|
public class RSAPrivateKey : RSAKeyBase, IAsymmetricPrivateKey, IAsymmetricKey
|
||||||
{
|
{
|
||||||
private string? _pem;
|
private string? _pem;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ namespace DigitalData.Core.Security.Cryptographer
|
|||||||
|
|
||||||
public IRSAEncryptor Encryptor => _lazyEncryptor.Value;
|
public IRSAEncryptor Encryptor => _lazyEncryptor.Value;
|
||||||
|
|
||||||
public RSADecryptor()
|
public RSAPrivateKey()
|
||||||
{
|
{
|
||||||
_lazyEncryptor = new(() => new RSAEncryptor()
|
_lazyEncryptor = new(() => new RSAEncryptor()
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user