feat(AsymCryptParams): Erstellt als spezifizierte Optionen für AsymCryptService
This commit is contained in:
parent
09406ca505
commit
6873bac8a1
6
DigitalData.Core.Security/AsymCryptParams.cs
Normal file
6
DigitalData.Core.Security/AsymCryptParams.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace DigitalData.Core.Security
|
||||||
|
{
|
||||||
|
public class AsymCryptParams : RSAFactoryParams
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@ using Microsoft.Extensions.Options;
|
|||||||
|
|
||||||
namespace DigitalData.Core.Security
|
namespace DigitalData.Core.Security
|
||||||
{
|
{
|
||||||
public class AsymCryptService<TRSAFactoryParams> : RSAFactory<TRSAFactoryParams>, IAsymCryptService, IRSAFactory<TRSAFactoryParams> where TRSAFactoryParams : RSAFactoryParams
|
public class AsymCryptService<TAsymCryptParams> : RSAFactory<TAsymCryptParams>, IAsymCryptService<TAsymCryptParams>, IRSAFactory<TAsymCryptParams> where TAsymCryptParams : AsymCryptParams
|
||||||
{
|
{
|
||||||
private readonly IDictionary<string, IRSADecryptor> _decryptors;
|
private readonly IDictionary<string, IRSADecryptor> _decryptors;
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ namespace DigitalData.Core.Security
|
|||||||
|
|
||||||
public Func<string, string, bool, Version?, string?, string> RSAKeyNameFormatter { get; }
|
public Func<string, string, bool, Version?, string?, string> RSAKeyNameFormatter { get; }
|
||||||
|
|
||||||
public AsymCryptService(IOptions<TRSAFactoryParams> options, IDictionary<string, IRSADecryptor> decryptors, Func<string, string, bool, Version?, string?, string> rsaKeyNameFormatter, ILogger<AsymCryptService<TRSAFactoryParams>>? logger = null) : base(options)
|
public AsymCryptService(IOptions<TAsymCryptParams> options, IDictionary<string, IRSADecryptor> decryptors, Func<string, string, bool, Version?, string?, string> rsaKeyNameFormatter, ILogger<AsymCryptService<TAsymCryptParams>>? logger = null) : base(options)
|
||||||
{
|
{
|
||||||
_decryptors = decryptors ?? new Dictionary<string, IRSADecryptor>();
|
_decryptors = decryptors ?? new Dictionary<string, IRSADecryptor>();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user