IAIK PKCS#11 Wrapper
version 1.2.16

iaik.pkcs.pkcs11.parameters
Class PBEParameters

java.lang.Object
  extended byiaik.pkcs.pkcs11.parameters.PBEParameters
All Implemented Interfaces:
Cloneable, Parameters

public class PBEParameters
extends Object
implements Parameters

This class encapsulates parameters for the Mechanism.PBA_* and Mechanism.PBA_SHA1_WITH_SHA1_HMAC mechanisms.

Invariants
(initializationVector_ == null) or ((initializationVector_ <> null) and (initializationVector_.length == 8)) and (password_ <> null) and (salt_ <> null)

Field Summary
protected  char[] initializationVector_
          The 8-byte initialization vector (IV), if an IV is required.
protected  long iterations_
          The number of iterations required for the generation.
protected  char[] password_
          The password to be used in the PBE key generation.
protected  char[] salt_
          The salt to be used in the PBE key generation.
 
Constructor Summary
PBEParameters(char[] initializationVector, char[] password, char[] salt, long iterations)
          Create a new PBEDeriveParameters object with the given attributes.
 
Method Summary
 Object clone()
          Create a (deep) clone of this object.
 boolean equals(Object otherObject)
          Compares all member variables of this object with the other object.
 char[] getInitializationVector()
          Get the 8-byte initialization vector (IV), if an IV is required.
 long getIterations()
          Get the number of iterations required for the generation.
 char[] getPassword()
          Get the password to be used in the PBE key generation.
 Object getPKCS11ParamsObject()
          Get this parameters object as an object of the CK_PBE_PARAMS class.
 char[] getSalt()
          Get the salt to be used in the PBE key generation.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setInitializationVector(char[] initializationVector)
          Set the 8-byte initialization vector (IV), if an IV is required.
 void setIterations(long iterations)
          Set the number of iterations required for the generation.
 void setPassword(char[] password)
          Set the password to be used in the PBE key generation.
 void setSalt(char[] salt)
          Set the salt to be used in the PBE key generation.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

initializationVector_

protected char[] initializationVector_
The 8-byte initialization vector (IV), if an IV is required.


password_

protected char[] password_
The password to be used in the PBE key generation.


salt_

protected char[] salt_
The salt to be used in the PBE key generation.


iterations_

protected long iterations_
The number of iterations required for the generation.

Constructor Detail

PBEParameters

public PBEParameters(char[] initializationVector,
                     char[] password,
                     char[] salt,
                     long iterations)
Create a new PBEDeriveParameters object with the given attributes.

Parameters:
initializationVector - The 8-byte initialization vector (IV), if an IV is required.
password - The password to be used in the PBE key generation.
salt - The salt to be used in the PBE key generation.
iterations - The number of iterations required for the generation.
Preconditions
(initializationVector == null) or ((initializationVector <> null) and (initializationVector.length == 8)) and (password <> null) and (salt <> null)
Postconditions
Method Detail

clone

public Object clone()
Create a (deep) clone of this object.

Returns:
A clone of this object.
Preconditions
Postconditions
(result <> null) and (result instanceof PBEParameters) and (result.equals(this))

getPKCS11ParamsObject

public Object getPKCS11ParamsObject()
Get this parameters object as an object of the CK_PBE_PARAMS class.

Specified by:
getPKCS11ParamsObject in interface Parameters
Returns:
This object as a CK_PBE_PARAMS object.
Preconditions
Postconditions
(result <> null)

getInitializationVector

public char[] getInitializationVector()
Get the 8-byte initialization vector (IV), if an IV is required.

Returns:
The 8-byte initialization vector (IV), if an IV is required.
Preconditions
Postconditions
(result == null) or ((result <> null) and (result.length == 8))

getPassword

public char[] getPassword()
Get the password to be used in the PBE key generation.

Returns:
The password to be used in the PBE key generation.
Preconditions
Postconditions
(result <> null)

getSalt

public char[] getSalt()
Get the salt to be used in the PBE key generation.

Returns:
The salt to be used in the PBE key generation.
Preconditions
Postconditions
(result <> null)

getIterations

public long getIterations()
Get the number of iterations required for the generation.

Returns:
The number of iterations required for the generation.
Preconditions
Postconditions

setInitializationVector

public void setInitializationVector(char[] initializationVector)
Set the 8-byte initialization vector (IV), if an IV is required.

Parameters:
initializationVector - The 8-byte initialization vector (IV), if an IV is required.
Preconditions
(initializationVector == null) or ((initializationVector <> null) and (initializationVector.length == 8))
Postconditions

setPassword

public void setPassword(char[] password)
Set the password to be used in the PBE key generation.

Parameters:
password - The password to be used in the PBE key generation.
Preconditions
(password <> null)
Postconditions

setSalt

public void setSalt(char[] salt)
Set the salt to be used in the PBE key generation.

Parameters:
salt - The salt to be used in the PBE key generation.
Preconditions
(salt <> null)
Postconditions

setIterations

public void setIterations(long iterations)
Set the number of iterations required for the generation.

Parameters:
iterations - The number of iterations required for the generation.
Preconditions
Postconditions

toString

public String toString()
Returns the string representation of this object. Do not parse data from this string, it is for debugging only.

Returns:
A string representation of this object.

equals

public boolean equals(Object otherObject)
Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.

Parameters:
otherObject - The other object to compare to.
Returns:
True, if other is an instance of this class and all member variables of both objects are equal. False, otherwise.
Preconditions
Postconditions

hashCode

public int hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable.

Returns:
The hash code of this object.
Preconditions
Postconditions

IAIK PKCS#11 Wrapper
version 1.2.16

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

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