refactor(Kryptograph): Entfernte Verschlüsselungen.
This commit is contained in:
parent
e623575fe8
commit
60e1ec78b3
@ -5,7 +5,5 @@
|
|||||||
IEnumerable<IAsymmetricDecryptor> Decryptors { get; }
|
IEnumerable<IAsymmetricDecryptor> Decryptors { get; }
|
||||||
|
|
||||||
IAsymmetricDecryptor VaultDecryptor { get; }
|
IAsymmetricDecryptor VaultDecryptor { get; }
|
||||||
|
|
||||||
IEnumerable<IAsymmetricEncryptor> Encryptors { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -15,10 +15,6 @@ namespace DigitalData.Core.Security
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IAsymmetricDecryptor VaultDecryptor { get; }
|
public IAsymmetricDecryptor VaultDecryptor { get; }
|
||||||
|
|
||||||
private readonly Lazy<IEnumerable<IAsymmetricEncryptor>> _lazyEncryptors;
|
|
||||||
|
|
||||||
public IEnumerable<IAsymmetricEncryptor> Encryptors => _lazyEncryptors.Value;
|
|
||||||
|
|
||||||
public IEnumerable<IAsymmetricTokenDescriptor> TokenDescriptors { get; init; } = new List<IAsymmetricTokenDescriptor>();
|
public IEnumerable<IAsymmetricTokenDescriptor> TokenDescriptors { get; init; } = new List<IAsymmetricTokenDescriptor>();
|
||||||
|
|
||||||
public Cryptograph(IOptions<CryptographParams> options, ILogger<Cryptograph>? logger = null) : base(options)
|
public Cryptograph(IOptions<CryptographParams> options, ILogger<Cryptograph>? logger = null) : base(options)
|
||||||
@ -37,8 +33,6 @@ namespace DigitalData.Core.Security
|
|||||||
TokenDescriptors = _params.TokenDescriptors;
|
TokenDescriptors = _params.TokenDescriptors;
|
||||||
|
|
||||||
VaultDecryptor = _params.VaultDecryptor ?? Decryptors.First();
|
VaultDecryptor = _params.VaultDecryptor ?? Decryptors.First();
|
||||||
|
|
||||||
_lazyEncryptors = new(Decryptors.Select(decryptor => decryptor.Encryptor));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user