public class PassphraseCallback extends java.lang.Object implements Callback, java.io.Serializable
Constructor and Description |
---|
PassphraseCallback(java.lang.String prompt)
Construct a
PassphraseCallback with a prompt. |
PassphraseCallback(java.lang.String prompt,
java.lang.String defaultPassphrase)
Construct a
PassphraseCallback with a prompt and default passphrase. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultPassphrase()
Get the default passphrase.
|
java.lang.String |
getPassphrase()
Get the retrieved passphrase.
|
java.lang.String |
getPrompt()
Get the prompt.
|
void |
setPassphrase(java.lang.String pw)
Set the retrieved passphrase.
|
public PassphraseCallback(java.lang.String prompt)
PassphraseCallback
with a prompt.prompt
- the prompt used to request the passphrase.java.lang.IllegalArgumentException
- if prompt
is null.public PassphraseCallback(java.lang.String prompt, java.lang.String defaultPassphrase)
PassphraseCallback
with a prompt and default passphrase.
prompt
- the prompt used to request the information.
defaultPassphrase
- the name to be used as the default name displayed with the
prompt.java.lang.IllegalArgumentException
- if prompt
is null.public java.lang.String getPrompt()
public java.lang.String getDefaultPassphrase()
null
if this PassphraseCallback
was
not instantiated with a defaultPassphrase
.public void setPassphrase(java.lang.String pw)
pw
- the passphrase (which may be null).getPassphrase()
public java.lang.String getPassphrase()
setPassphrase(java.lang.String)