Package org.eclipse.ecf.core.security
Class PassphraseCallback
java.lang.Object
org.eclipse.ecf.core.security.PassphraseCallback
- All Implemented Interfaces:
Serializable
,Callback
Callback that handles passphrases
- See Also:
-
Constructor Summary
ConstructorDescriptionPassphraseCallback
(String prompt) Construct aPassphraseCallback
with a prompt.PassphraseCallback
(String prompt, String defaultPassphrase) Construct aPassphraseCallback
with a prompt and default passphrase. -
Method Summary
Modifier and TypeMethodDescriptionGet the default passphrase.Get the retrieved passphrase.Get the prompt.void
setPassphrase
(String pw) Set the retrieved passphrase.
-
Constructor Details
-
PassphraseCallback
Construct aPassphraseCallback
with a prompt.- Parameters:
prompt
- the prompt used to request the passphrase.- Throws:
IllegalArgumentException
- ifprompt
is null.
-
PassphraseCallback
Construct aPassphraseCallback
with a prompt and default passphrase.- Parameters:
prompt
- the prompt used to request the information.defaultPassphrase
- the name to be used as the default name displayed with the prompt.- Throws:
IllegalArgumentException
- ifprompt
is null.
-
-
Method Details
-
getPrompt
Get the prompt.- Returns:
- the prompt.
-
getDefaultPassphrase
Get the default passphrase.- Returns:
- the default passphrase, or
null
if thisPassphraseCallback
was not instantiated with adefaultPassphrase
.
-
setPassphrase
Set the retrieved passphrase.- Parameters:
pw
- the passphrase (which may be null).- See Also:
-
getPassphrase
Get the retrieved passphrase.- Returns:
- the retrieved passphrase (which may be null)
- See Also:
-