KeyPasswordProvider provides passwords for encrypted private keys.
| Modifier and Type | Method and Description |
|---|---|
| public default int | Returns: the number of times to ask for a passphrase; should be >= 1.Gets the maximum number of attempts to get a passphrase that should be attempted for one identity resource through this provider. |
| public char[] | Returns: the passphraseidentifying the key resource that is being attempted to be
loaded uri, int the number of previous attempts to get a passphrase; >= 0 attempt)Obtains a passphrase to use to decrypt an ecrypted private key. |
| public boolean | Returns: true to re-try again; false to re-raise the
error exception; Ignored if the key was loaded
successfully, i.e., if error == null.identifying the key resource the key was attempted to be
loaded from uri, int the number of times attempt, Exception getPassphrase(URIish, int) had
been called; zero indicates that uri refers to a
non-encrypted keynull if the key was loaded successfully; otherwise an
exception indicating why the key could not be loadedInvoked after a key has been loaded. |
| public void | setAttempts(int
number of times to ask for a passphrase;
maxNumberOfAttempts)IllegalArgumentException may be thrown if <= 0Define the maximum number of attempts to get a passphrase that should be attempted for one identity resource through this provider. |
| getAttempts | back to summary |
|---|---|
| public default int getAttempts() Gets the maximum number of attempts to get a passphrase that should be attempted for one identity resource through this provider. The default return 1.
| |
| getPassphrase | back to summary |
|---|---|
| public char[] getPassphrase(URIish uri, int attempt) throws IOException Obtains a passphrase to use to decrypt an ecrypted private key. Returning
| |
| keyLoaded | back to summary |
|---|---|
| public boolean keyLoaded(URIish uri, int attempt, Exception error) throws IOException, GeneralSecurityException Invoked after a key has been loaded. If this raises an exception, the
original
| |
| setAttempts | back to summary |
|---|---|
| public void setAttempts(int maxNumberOfAttempts) Define the maximum number of attempts to get a passphrase that should be attempted for one identity resource through this provider.
| |