IAIK PKCS#11 Wrapper
version 1.2.16

iaik.pkcs.pkcs11.parameters
Class MacGeneralParameters

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

public class MacGeneralParameters
extends Object
implements Parameters

This class encapsulates parameters for the MAC algorithms for the following mechanisms: DES, DES3 (triple-DES), CAST, CAST3, CAST128 (CAST5), IDEA, and CDMF ciphers.

Invariants

Field Summary
protected  long macLength_
          The length of the MAC produced, in bytes.
 
Constructor Summary
MacGeneralParameters(long macLength)
          Create a new MacGeneralParameters object with the given MAC length.
 
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.
 long getMacLength()
          Get the length of the MAC produced, in bytes.
 Object getPKCS11ParamsObject()
          Get this parameters object as an Long object.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setMacLength(long macLength)
          Set the length of the MAC produced, 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

macLength_

protected long macLength_
The length of the MAC produced, in bytes.

Constructor Detail

MacGeneralParameters

public MacGeneralParameters(long macLength)
Create a new MacGeneralParameters object with the given MAC length.

Parameters:
macLength - The length of the MAC produced, in bytes.
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 MacGeneralParameters) and (result.equals(this))

getPKCS11ParamsObject

public Object getPKCS11ParamsObject()
Get this parameters object as an Long object.

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

getMacLength

public long getMacLength()
Get the length of the MAC produced, in bytes.

Returns:
The length of the MAC produced, in bytes.
Preconditions
Postconditions

setMacLength

public void setMacLength(long macLength)
Set the length of the MAC produced, in bytes.

Parameters:
macLength - The length of the MAC produced, in bytes.
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.