feat(AsymCryptService): Implementiert IEnumerable<IRSADecryptor>
This commit is contained in:
parent
68ef0a7537
commit
30177cf0c7
@ -3,10 +3,12 @@ using DigitalData.Core.Security.Config;
|
|||||||
using DigitalData.Core.Security.Cryptographer;
|
using DigitalData.Core.Security.Cryptographer;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
namespace DigitalData.Core.Security
|
namespace DigitalData.Core.Security
|
||||||
{
|
{
|
||||||
public class AsymCryptService<TAsymCryptParams> : RSAFactory<TAsymCryptParams>, IAsymCryptService<TAsymCryptParams>, IRSAFactory<TAsymCryptParams> where TAsymCryptParams : AsymCryptParams
|
public class AsymCryptService<TAsymCryptParams> : RSAFactory<TAsymCryptParams>, IAsymCryptService<TAsymCryptParams>, IRSAFactory<TAsymCryptParams>, IEnumerable<IRSADecryptor>
|
||||||
|
where TAsymCryptParams : AsymCryptParams
|
||||||
{
|
{
|
||||||
public IEnumerable<IRSADecryptor> Decryptors => _params.Decryptors;
|
public IEnumerable<IRSADecryptor> Decryptors => _params.Decryptors;
|
||||||
|
|
||||||
@ -14,5 +16,9 @@ namespace DigitalData.Core.Security
|
|||||||
{
|
{
|
||||||
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 IEnumerator<IRSADecryptor> GetEnumerator() => Decryptors.GetEnumerator();
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator() => Decryptors.GetEnumerator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user