IAIK PKCS#11 Wrapper
version 1.2.17

iaik.pkcs.pkcs11.parameters
Class RC5Parameters

java.lang.Object
  extended byiaik.pkcs.pkcs11.parameters.RC5Parameters
All Implemented Interfaces:
Cloneable, Parameters
Direct Known Subclasses:
RC5CbcParameters, RC5MacGeneralParameters

public class RC5Parameters
extends Object
implements Parameters

This class encapsulates parameters for the algorithms Mechanism.RC5_ECB and Mechanism.RC5_MAC.

Invariants

Field Summary
protected  long rounds_
          The number of rounds of RC5 encipherment.
protected  long wordSize_
          The wordsize of RC5 cipher in bytes.
 
Constructor Summary
RC5Parameters(long wordSize, long rounds)
          Create a new RC5Parameters object with the given word size and given rounds.
 
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.
 Object getPKCS11ParamsObject()
          Get this parameters object as an object of the CK_RC5_PARAMS class.
 long getRounds()
          Get number of rounds of RC5 encipherment.
 long getWordSize()
          Get the wordsize of RC5 cipher in bytes.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setMacLength(long rounds)
          Set the number of rounds of RC5 encipherment.
 void setWordSize(long wordSize)
          Set the wordsize of RC5 cipher in bytes.
 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

wordSize_

protected long wordSize_
The wordsize of RC5 cipher in bytes.


rounds_

protected long rounds_
The number of rounds of RC5 encipherment.

Constructor Detail

RC5Parameters

public RC5Parameters(long wordSize,
                     long rounds)
Create a new RC5Parameters object with the given word size and given rounds.

Parameters:
wordSize - The wordsize of RC5 cipher in bytes.
rounds - The number of rounds of RC5 encipherment.
Preconditions
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 RC5Parameters) and (result.equals(this))

getWordSize

public long getWordSize()
Get the wordsize of RC5 cipher in bytes.

Returns:
The wordsize of RC5 cipher in bytes.
Preconditions
Postconditions

getRounds

public long getRounds()
Get number of rounds of RC5 encipherment.

Returns:
The number of rounds of RC5 encipherment.
Preconditions
Postconditions

getPKCS11ParamsObject

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

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

setWordSize

public void setWordSize(long wordSize)
Set the wordsize of RC5 cipher in bytes.

Parameters:
wordSize - The wordsize of RC5 cipher in bytes.
Preconditions
Postconditions

setMacLength

public void setMacLength(long rounds)
Set the number of rounds of RC5 encipherment.

Parameters:
rounds - The number of rounds of RC5 encipherment.
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.17

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.