withPassphraseRetries
private fn
T withPassphraseRetries(T)(SshPassphraseProvider provider,
string container,
scope T delegate(const(ubyte)[] passphrase) attempt)Runs one decryption attempt per passphrase obtained from provider, retrying a rejected passphrase until maxPassphraseAttempts is exhausted.
Parameters
provider | Passphrase source; null never happens here (the caller checks first). |
container | Human-readable container description for the info struct and error messages. |
attempt | Delegate performing one full decrypt-and-parse pass; it signals a rejected passphrase by throwing SshKeyPassphraseException. |
Returns
Whatever the successful attempt produced.
Throws
SshKeyPassphraseException when the provider declines or
every attempt is rejected; anything else propagates unchanged.