public class NewPassphraseConsoleDialog extends java.lang.Object implements NewPassphrasePrompt
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 boolean |
oldPassphraseRequired_
Indicates if the old passphrase is required.
|
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 static java.util.ResourceBundle |
res_
Used to read strings from (internationalization)
|
protected java.lang.String |
title_
Title of this dialog
|
Constructor and Description |
---|
NewPassphraseConsoleDialog()
default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCancelAllowed()
True, if this prompt can be canceled by the user; i.e.
|
char[][] |
promptNewPassphrase()
Prompt the new passphrase and the old passphrase if required from the user.
|
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 |
setOldPassphraseRequired(boolean oldPassphraseRequired)
Set if the use must enter the old passphrase in addition to the new.
|
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 static java.util.ResourceBundle res_
protected java.lang.String title_
protected java.lang.String message_
protected java.lang.Object protectedResourceInfo_
protected boolean cancelAllowed_
protected boolean oldPassphraseRequired_
protected java.io.PrintWriter output_
protected java.io.BufferedReader input_
public NewPassphraseConsoleDialog()
public void setOldPassphraseRequired(boolean oldPassphraseRequired)
NewPassphrasePrompt
setOldPassphraseRequired
in interface NewPassphrasePrompt
oldPassphraseRequired
- True, the use must enter the old passphrase in addition to the new.public char[][] promptNewPassphrase()
NewPassphrasePrompt
promptNewPassphrase
in interface NewPassphrasePrompt
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 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.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