feat(AsymCryptParams): Erstellt als spezifizierte Optionen für AsymCryptService

This commit is contained in:
Developer 02 2024-12-03 10:12:51 +01:00
parent 09406ca505
commit 6873bac8a1
2 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,6 @@
namespace DigitalData.Core.Security
{
public class AsymCryptParams : RSAFactoryParams
{
}
}

View File

@ -4,7 +4,7 @@ using Microsoft.Extensions.Options;
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;
@ -12,7 +12,7 @@ namespace DigitalData.Core.Security
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>();