IAIK PKCS#11 Wrapper
version 1.5

iaik.pkcs.pkcs11.parameters
Class RSAPkcsParameters

java.lang.Object
  |
  +--iaik.pkcs.pkcs11.parameters.RSAPkcsParameters
All Implemented Interfaces:
java.lang.Cloneable, Parameters
Direct Known Subclasses:
RSAPkcsOaepParameters, RSAPkcsPssParameters

public abstract class RSAPkcsParameters
extends java.lang.Object
implements Parameters

This abstract class encapsulates parameters for the RSA PKCS mechanisms Mechanism.RSA_PKCS_OAEP and Mechanism.RSA_PKCS_PSS.

Version:
1.0
Author:
Karl Scheibelhofer

Inner Class Summary
static interface RSAPkcsParameters.MessageGenerationFunctionType
          This interface defines the available message generation function types as defined by PKCS#11: CKG_MGF1_SHA1, CKG_MGF1_SHA256, CKG_MGF1_SHA384 and CKG_MGF1_SHA512.
 
Field Summary
protected  Mechanism hashAlgorithm_
          The message digest algorithm used to calculate the digest of the encoding parameter.
protected  long maskGenerationFunction_
          The mask to apply to the encoded block.
 
Constructor Summary
protected RSAPkcsParameters(Mechanism hashAlgorithm, long maskGenerationFunction)
          Create a new RSAPkcsarameters object with the given attributes.
 
Method Summary
 java.lang.Object clone()
          Create a (deep) clone of this object.
 boolean equals(java.lang.Object otherObject)
          Compares all member variables of this object with the other object.
 Mechanism getHashAlgorithm()
          Get the message digest algorithm used to calculate the digest of the encoding parameter.
 long getMaskGenerationFunction()
          Get the mask to apply to the encoded block.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setHashAlgorithm(Mechanism hashAlgorithm)
          Set the message digest algorithm used to calculate the digest of the encoding parameter.
 void setMaskGenerationFunction(long maskGenerationFunction)
          Set the mask function to apply to the encoded block.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface iaik.pkcs.pkcs11.parameters.Parameters
getPKCS11ParamsObject
 

Field Detail

hashAlgorithm_

protected Mechanism hashAlgorithm_
The message digest algorithm used to calculate the digest of the encoding parameter.

maskGenerationFunction_

protected long maskGenerationFunction_
The mask to apply to the encoded block.
Constructor Detail

RSAPkcsParameters

protected RSAPkcsParameters(Mechanism hashAlgorithm,
                            long maskGenerationFunction)
Create a new RSAPkcsarameters object with the given attributes.
Parameters:
hashAlgorithm - The message digest algorithm used to calculate the digest of the encoding parameter.
maskGenerationFunction - The mask to apply to the encoded block. One of the constants defined in the MessageGenerationFunctionType interface.
Method Detail

clone

public java.lang.Object clone()
Create a (deep) clone of this object.
Overrides:
clone in class java.lang.Object
Returns:
A clone of this object.

getHashAlgorithm

public Mechanism getHashAlgorithm()
Get the message digest algorithm used to calculate the digest of the encoding parameter.
Returns:
The message digest algorithm used to calculate the digest of the encoding parameter.

getMaskGenerationFunction

public long getMaskGenerationFunction()
Get the mask to apply to the encoded block.
Returns:
The mask to apply to the encoded block.

setHashAlgorithm

public void setHashAlgorithm(Mechanism hashAlgorithm)
Set the message digest algorithm used to calculate the digest of the encoding parameter.
Parameters:
hashAlgorithm - The message digest algorithm used to calculate the digest of the encoding parameter.

setMaskGenerationFunction

public void setMaskGenerationFunction(long maskGenerationFunction)
Set the mask function to apply to the encoded block. One of the constants defined in the MessageGenerationFunctionType interface.
Parameters:
maskGenerationFunction - The mask to apply to the encoded block.

toString

public java.lang.String toString()
Returns the string representation of this object. Do not parse data from this string, it is for debugging only.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.

equals

public boolean equals(java.lang.Object otherObject)
Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.
Overrides:
equals in class java.lang.Object
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.

hashCode

public int hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code of this object.

IAIK PKCS#11 Wrapper
version 1.5

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.5