refactor(RSADecryptor): umbenennen in RSAPrivateKey

This commit is contained in:
Developer 02
2025-01-07 11:20:24 +01:00
parent 5e1bf16b6d
commit 4ce738957d
3 changed files with 5 additions and 5 deletions

View File

@@ -40,9 +40,9 @@ namespace DigitalData.Core.Security.Config
/// </summary>
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()
{

View File

@@ -56,7 +56,7 @@ namespace DigitalData.Core.Security.Cryptographer
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,
Issuer = issuer ?? string.Empty,

View File

@@ -4,7 +4,7 @@ using System.Security.Cryptography;
namespace DigitalData.Core.Security.Cryptographer
{
public class RSADecryptor : RSAKeyBase, IAsymmetricPrivateKey, IAsymmetricKey
public class RSAPrivateKey : RSAKeyBase, IAsymmetricPrivateKey, IAsymmetricKey
{
private string? _pem;
@@ -28,7 +28,7 @@ namespace DigitalData.Core.Security.Cryptographer
public IRSAEncryptor Encryptor => _lazyEncryptor.Value;
public RSADecryptor()
public RSAPrivateKey()
{
_lazyEncryptor = new(() => new RSAEncryptor()
{