withPassphraseRetries

private fnT 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

providerPassphrase source; null never happens here (the caller checks first).
containerHuman-readable container description for the info struct and error messages.
attemptDelegate 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.