refactor(AsymCryptService): Methode Default.get hinzugefügt, um den ersten Decryptor zu erhalten.
- Wirft InvalidOperationException, wenn kein Decryptor verfügbar ist.
This commit is contained in:
parent
324a5bdb1e
commit
b32f0df125
@ -12,6 +12,13 @@ namespace DigitalData.Core.Security
|
||||
{
|
||||
public IEnumerable<IRSADecryptor> Decryptors => _params.Decryptors;
|
||||
|
||||
public IRSADecryptor Default => Decryptors.FirstOrDefault()
|
||||
?? throw new InvalidOperationException(
|
||||
"No default decryptor is available. Ensure that at least one decryptor is configured in the provided parameters. " +
|
||||
"This issue typically arises if the configuration for decryptors is incomplete or missing. " +
|
||||
"Check the 'Decryptors' collection in the configuration and verify that it contains valid entries."
|
||||
);
|
||||
|
||||
public IRSADecryptor this[string key]
|
||||
{
|
||||
get
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user