refactor(AsymCryptService): Entschlüsselungswörterbuch entfernt
This commit is contained in:
parent
8003cffb9b
commit
6f520732dd
@ -12,16 +12,9 @@ namespace DigitalData.Core.Security
|
|||||||
|
|
||||||
public IEnumerable<IRSAEncryptor> Encryptors => _params.Encryptors;
|
public IEnumerable<IRSAEncryptor> Encryptors => _params.Encryptors;
|
||||||
|
|
||||||
private readonly Dictionary<string, IRSADecryptor> _decryptors;
|
|
||||||
|
|
||||||
public IRSADecryptor this[string key] { get => _decryptors[key]; set => _decryptors[key] = value; }
|
|
||||||
|
|
||||||
public AsymCryptService(IOptions<TAsymCryptParams> options, ILogger<AsymCryptService<TAsymCryptParams>>? logger = null) : base(options)
|
public AsymCryptService(IOptions<TAsymCryptParams> options, ILogger<AsymCryptService<TAsymCryptParams>>? logger = null) : base(options)
|
||||||
{
|
{
|
||||||
_decryptors = new();
|
|
||||||
logger?.LogInformation("Core.Secrets version: {Version}, Created on: {CreationDate}.", Secrets.Version, Secrets.CreationDate.ToString("dd.MM.yyyy"));
|
logger?.LogInformation("Core.Secrets version: {Version}, Created on: {CreationDate}.", Secrets.Version, Secrets.CreationDate.ToString("dd.MM.yyyy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetRSADecryptor(string key, out IRSADecryptor? decryptor) => _decryptors.TryGetValue(key, out decryptor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user