IAIK PKCS#11 Wrapper
version 1.2.17

iaik.pkcs.pkcs11.parameters
Class X942DH1KeyDerivationParameters

java.lang.Object
  extended byiaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
      extended byiaik.pkcs.pkcs11.parameters.X942DH1KeyDerivationParameters
All Implemented Interfaces:
Cloneable, Parameters
Direct Known Subclasses:
X942DH2KeyDerivationParameters

public class X942DH1KeyDerivationParameters
extends DHKeyDerivationParameters

This abstract class encapsulates parameters for the X9.42 DH mechanism Mechanism.X9_42_DH_DERIVE.

Invariants

Nested Class Summary
 
Nested classes inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
DHKeyDerivationParameters.KeyDerivationFunctionType
 
Field Summary
protected  byte[] otherInfo_
          The data shared between the two parties.
 
Fields inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
keyDerivationFunction_, publicData_
 
Constructor Summary
X942DH1KeyDerivationParameters(long keyDerivationFunction, byte[] otherInfo, byte[] publicData)
          Create a new X942DH1KeyDerivationParameters 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.
 byte[] getOtherInfo()
          Get the data shared between the two parties.
 Object getPKCS11ParamsObject()
          Get this parameters object as an object of the CK_X9_42_DH1_DERIVE_PARAMS class.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setOtherInfo(byte[] otherInfo)
          Set the data shared between the two parties.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
getKeyDerivationFunction, getPublicData, setKeyDerivationFunction, setPublicData
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

otherInfo_

protected byte[] otherInfo_
The data shared between the two parties.

Constructor Detail

X942DH1KeyDerivationParameters

public X942DH1KeyDerivationParameters(long keyDerivationFunction,
                                      byte[] otherInfo,
                                      byte[] publicData)
Create a new X942DH1KeyDerivationParameters object with the given attributes.

Parameters:
keyDerivationFunction - The key derivation function used on the shared secret value. One of the values defined in KeyDerivationFunctionType.
otherInfo - The data shared between the two parties.
publicData - The other partie's public key value.
Preconditions
((keyDerivationFunction == KeyDerivationFunctionType.NULL) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF_ASN1) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF_CONCATENATE)) and (publicData <> null)
Postconditions
Method Detail

clone

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

Overrides:
clone in class DHKeyDerivationParameters
Returns:
A clone of this object.
Preconditions
Postconditions
(result <> null) and (result instanceof X942DH1KeyDerivationParameters) and (result.equals(this))

getPKCS11ParamsObject

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

Returns:
This object as a CK_X9_42_DH1_DERIVE_PARAMS object.
Preconditions
Postconditions
(result <> null)

getOtherInfo

public byte[] getOtherInfo()
Get the data shared between the two parties.

Returns:
The data shared between the two parties.
Preconditions
Postconditions

setOtherInfo

public void setOtherInfo(byte[] otherInfo)
Set the data shared between the two parties.

Parameters:
otherInfo - The data shared between the two parties.
Preconditions
(otherInfo <> null)
Postconditions

toString

public 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 DHKeyDerivationParameters
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.

Overrides:
equals in class DHKeyDerivationParameters
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.

Overrides:
hashCode in class DHKeyDerivationParameters
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.