public final class PassphraseConsoleDialog extends java.lang.Object implements PassphrasePrompt
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancelAllowed_
Indicates if this passphrase dialog can be canceled by the user with entering a password
|
protected java.io.BufferedReader |
input_
The stream to read the user input from.
|
static java.lang.String |
LINE_SEPARATOR |
protected java.lang.String |
message_
Message in this dialog
|
protected java.io.PrintWriter |
output_
The stream the write the prompt messages to.
|
protected java.lang.Object |
protectedResourceInfo_
Object specifying the protected resource; e.g.
|
protected java.lang.String |
title_
Title of this dialog
|
Constructor and Description |
---|
PassphraseConsoleDialog()
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCancelAllowed()
True, if this prompt can be canceled by the user; i.e.
|
char[] |
promptPassphrase()
Prompt the passphrase from the user after displaying the prompt message to him.
|
void |
setCancelAllowed(boolean allowCancel)
Set this prompt object to allow cancelling or not.
|
void |
setMessage(java.lang.Object promptMessageObject)
Set the prompt object that should be presented to the user as information what passphrase is
required.
|
void |
setProtectedResourceInfo(java.lang.Object protectedResourceInfo)
Set the object that specifies the protectd resource; i.e.
|
public static final java.lang.String LINE_SEPARATOR
protected java.lang.String title_
protected java.lang.String message_
protected java.lang.Object protectedResourceInfo_
protected boolean cancelAllowed_
protected java.io.PrintWriter output_
protected java.io.BufferedReader input_
public void setMessage(java.lang.Object promptMessageObject)
setMessage
in interface PassphraseInterfacce
promptMessageObject
- The object from which the implementation can get a human readable string that gives
information what passphrase the user should enter.public void setProtectedResourceInfo(java.lang.Object protectedResourceInfo)
setProtectedResourceInfo
in interface PassphraseInterfacce
protectedResourceInfo
- The object that specifies the protected resource in more detail; e.g. the smart card.
The PKCS#11 provider may provide a TokenInfo object.public boolean isCancelAllowed()
isCancelAllowed
in interface PassphraseInterfacce
public void setCancelAllowed(boolean allowCancel)
setCancelAllowed
in interface PassphraseInterfacce
allowCancel
- If true, canceling the prompt is allowed.public char[] promptPassphrase()
promptPassphrase
in interface PassphrasePrompt
IAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4