IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.apps.util.passphrase
Class PassphraseHolder

java.lang.Object
  extended by iaik.apps.util.passphrase.PassphraseHolder
All Implemented Interfaces:
PassphraseInterfacce, PassphrasePrompt

public final class PassphraseHolder
extends java.lang.Object
implements PassphrasePrompt

A simple object for passing a constant passphrase or PIN.

Author:
Karl Scheibelhofer

Constructor Summary
PassphraseHolder()
          Empty constructor.
PassphraseHolder(char[] passphrase)
          Constructor taking the passphrase.
 
Method Summary
 char[] getPassphrase()
          Gets the passphrase.
 boolean isCancelAllowed()
          The implementation always returns false.
 char[] promptPassphrase()
          Gets the passphrase.
 void setCancelAllowed(boolean allowCancel)
          The implementation of this method does nothing.
 void setMessage(java.lang.Object promptMessageObject)
          The implementation of this method does nothing.
 void setPassphrase(char[] passphrase)
          Sets the passphrase.
 void setProtectedResourceInfo(java.lang.Object protectedResourceInfo)
          The implementation of this method does nothing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassphraseHolder

public PassphraseHolder()
Empty constructor.


PassphraseHolder

public PassphraseHolder(char[] passphrase)
Constructor taking the passphrase.

Parameters:
passphrase -
Method Detail

setMessage

public void setMessage(java.lang.Object promptMessageObject)
The implementation of this method does nothing.

Specified by:
setMessage in interface PassphraseInterfacce
Parameters:
promptMessageObject - Ignored.

setProtectedResourceInfo

public void setProtectedResourceInfo(java.lang.Object protectedResourceInfo)
The implementation of this method does nothing.

Specified by:
setProtectedResourceInfo in interface PassphraseInterfacce
Parameters:
protectedResourceInfo - Ignored.

getPassphrase

public char[] getPassphrase()
Gets the passphrase.

Returns:
The passphrase.

setPassphrase

public void setPassphrase(char[] passphrase)
Sets the passphrase.

Parameters:
passphrase - The passphrase.

isCancelAllowed

public boolean isCancelAllowed()
The implementation always returns false.

Specified by:
isCancelAllowed in interface PassphraseInterfacce
Returns:
False.

setCancelAllowed

public void setCancelAllowed(boolean allowCancel)
The implementation of this method does nothing.

Specified by:
setCancelAllowed in interface PassphraseInterfacce
Parameters:
allowCancel - Ignored.

promptPassphrase

public char[] promptPassphrase()
Gets the passphrase.

Specified by:
promptPassphrase in interface PassphrasePrompt
Returns:
The passphrase.

IAIK PKCS#11 Provider API Documentation
version 1.6

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.6