Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## iaik.pkcs.pkcs11.parameters
Class PKCS5PBKD2Parameters

    java.lang.Object
      iaik.pkcs.pkcs11.parameters.PKCS5PBKD2Parameters

All Implemented Interfaces:
  Cloneable, Parameters

public class PKCS5PBKD2Parameters
extends Object
implements Parameters

This class encapsulates parameters for the Mechanism.PKCS5_PKKD2 mechanism.

Invariants
  (saltSource_ == SaltSourceType.SaltSpecified) and (saltSourceData_ <> null) and (pseudoRandomFunction_ == PseudoRandomFunctionType.HMACSha1) and (pseudoRandomFunctionData_ <> null)

Nested Class Summary
`static interface` | `PKCS5PBKD2Parameters.PseudoRandomFunctionType` This interface defines the available pseudo-random function types as defined by PKCS#11: CKP_PKCS5_PBKD2_HMAC_SHA1.
`static interface` | `PKCS5PBKD2Parameters.SaltSourceType` This interface defines the available sources of the salt value as defined by PKCS#11: CKZ_SALT_SPECIFIED.

Field Summary
`protected long` | `iterations_` The number of iterations to perform when generating each block of random data.
`protected long` | `pseudoRandomFunction_` The pseudo-random function (PRF) to used to generate the key.
`protected byte[]` | `pseudoRandomFunctionData_` The data used as the input for PRF in addition to the salt value.
`protected long` | `saltSource_` The source of the salt value.
`protected byte[]` | `saltSourceData_` The data used as the input for the salt source.

Constructor Summary
`PKCS5PBKD2Parameters(long saltSource, byte[] saltSourceData, long iterations, long pseudoRandomFunction, byte[] pseudoRandomFunctionData)` 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.
`long` | `getIterations()` Get the number of iterations to perform when generating each block of random data.
`Object` | `getPKCS11ParamsObject()` Get this parameters object as an object of the CK_PKCS5_PBKD2_PARAMS class.
`long` | `getPseudoRandomFunction()` Get the pseudo-random function (PRF) to used to generate the key.
`byte[]` | `getPseudoRandomFunctionData()` Get the data used as the input for PRF in addition to the salt value.
`long` | `getSaltSource()` Get the source of the salt value.
`byte[]` | `getSaltSourceData()` Get the data used as the input for the salt source.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`void` | `setIterations(long iterations)` Set the number of iterations to perform when generating each block of random data.
`void` | `setPseudoRandomFunction(long pseudoRandomFunction)` Set the pseudo-random function (PRF) to used to generate the key.
`void` | `setPseudoRandomFunctionData(byte[] pseudoRandomFunctionData)` Set the data used as the input for PRF in addition to the salt value.
`void` | `setSaltSource(long saltSource)` Set the source of the salt value.
`void` | `setSaltSourceData(byte[] saltSourceData)` Set the data used as the input for the salt source.
`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

### saltSource_

    protected long saltSource_

  The source of the salt value.

### saltSourceData_

    protected byte[] saltSourceData_

  The data used as the input for the salt source.

### iterations_

    protected long iterations_

  The number of iterations to perform when generating each block of random data.

### pseudoRandomFunction_

    protected long pseudoRandomFunction_

  The pseudo-random function (PRF) to used to generate the key.

### pseudoRandomFunctionData_

    protected byte[] pseudoRandomFunctionData_

  The data used as the input for PRF in addition to the salt value.

Constructor Detail

### PKCS5PBKD2Parameters

    public PKCS5PBKD2Parameters(long saltSource,
                                byte[] saltSourceData,
                                long iterations,
                                long pseudoRandomFunction,
                                byte[] pseudoRandomFunctionData)

  Create a new PBEDeriveParameters object with the given attributes.

Parameters:
  `saltSource` - The source of the salt value. One of the constants defined in the SaltSourceType interface.
  `saltSourceData` - The data used as the input for the salt source.
  `iterations` - The number of iterations to perform when generating each block of random data.
  `pseudoRandomFunction` - The pseudo-random function (PRF) to used to generate the key. One of the constants defined in the PseudoRandomFunctionType interface.
  `pseudoRandomFunctionData` - The data used as the input for PRF in addition to the salt value.
Preconditions
  (saltSource == SaltSourceType.SaltSpecified) and (saltSourceData <> null) and (pseudoRandomFunction == PseudoRandomFunctionType.HMACSha1) and (pseudoRandomFunctionData <> 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 PKCS5PBKD2Parameters) and (result.equals(this))

### getPKCS11ParamsObject

    public Object getPKCS11ParamsObject()

  Get this parameters object as an object of the CK_PKCS5_PBKD2_PARAMS class.

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

### getSaltSource

    public long getSaltSource()

  Get the source of the salt value.

  Returns:
    The source of the salt value.
  Preconditions
  Postconditions
    (result == SaltSourceType.SaltSpecified)

### getSaltSourceData

    public byte[] getSaltSourceData()

  Get the data used as the input for the salt source.

  Returns:
    data used as the input for the salt source.
  Preconditions
  Postconditions
    (result <> null)

### getIterations

    public long getIterations()

  Get the number of iterations to perform when generating each block of random data.

  Returns:
    The number of iterations to perform when generating each block of random data.
  Preconditions
  Postconditions

### getPseudoRandomFunction

    public long getPseudoRandomFunction()

  Get the pseudo-random function (PRF) to used to generate the key.

  Returns:
    The pseudo-random function (PRF) to used to generate the key.
  Preconditions
  Postconditions
    (result == PseudoRandomFunctionType.HMACSha1)

### getPseudoRandomFunctionData

    public byte[] getPseudoRandomFunctionData()

  Get the data used as the input for PRF in addition to the salt value.

  Returns:
    The data used as the input for PRF in addition to the salt value.
  Preconditions
  Postconditions
    (result <> null)

### setSaltSource

    public void setSaltSource(long saltSource)

  Set the source of the salt value.

  Parameters:
    `saltSource` - The source of the salt value. One of the constants defined in the SaltSourceType interface
  Preconditions
    (saltSource == SaltSourceType.SaltSpecified)
  Postconditions

### setSaltSourceData

    public void setSaltSourceData(byte[] saltSourceData)

  Set the data used as the input for the salt source.

  Parameters:
    `saltSourceData` - The data used as the input for the salt source.
  Preconditions
    (saltSourceData <> null)
  Postconditions

### setIterations

    public void setIterations(long iterations)

  Set the number of iterations to perform when generating each block of random data.

  Parameters:
    `iterations` - The number of iterations to perform when generating each block of random data.
  Preconditions
  Postconditions

### setPseudoRandomFunction

    public void setPseudoRandomFunction(long pseudoRandomFunction)

  Set the pseudo-random function (PRF) to used to generate the key.

  Parameters:
    `pseudoRandomFunction` - The pseudo-random function (PRF) to used to generate the key. One of the constants defined in the PseudoRandomFunctionType interface.
  Preconditions
    (pseudoRandomFunction == PseudoRandomFunctionType.HMACSha1)
  Postconditions

### setPseudoRandomFunctionData

    public void setPseudoRandomFunctionData(byte[] pseudoRandomFunctionData)

  Set the data used as the input for PRF in addition to the salt value.

  Parameters:
    `pseudoRandomFunctionData` - The data used as the input for PRF in addition to the salt value.
  Preconditions
    (pseudoRandomFunctionData <> 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.

  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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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.