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 RSAPkcsOaepParameters

    java.lang.Object
      iaik.pkcs.pkcs11.parameters.RSAPkcsParameters
          iaik.pkcs.pkcs11.parameters.RSAPkcsOaepParameters

All Implemented Interfaces:
  Cloneable, Parameters

public class RSAPkcsOaepParameters
extends RSAPkcsParameters

This class encapsulates parameters for the Mechanism.RSA_PKCS_OAEP.

Invariants
  (source_ == SourceType.Empty) or (source_ == SourceType.DataSpecified)

Nested Class Summary
`static interface` | `RSAPkcsOaepParameters.SourceType` This interface defines the available source types as defined by PKCS#11: CKZ_DATA_SPECIFIED.

Nested classes inherited from class iaik.pkcs.pkcs11.parameters.RSAPkcsParameters
`RSAPkcsParameters.MessageGenerationFunctionType`

Field Summary
`protected long` | `source_` The source of the encoding parameter.
`protected byte[]` | `sourceData_` The data used as the input for the encoding parameter source.

Fields inherited from class iaik.pkcs.pkcs11.parameters.RSAPkcsParameters
`hashAlgorithm_, maskGenerationFunction_`

Constructor Summary
`RSAPkcsOaepParameters(Mechanism hashAlgorithm, long maskGenerationFunction, long source, byte[] sourceData)` Create a new RSAPkcsOaepParameters 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.
`Object` | `getPKCS11ParamsObject()` Get this parameters object as an object of the CK_RSA_PKCS_OAEP_PARAMS class.
`long` | `getSource()` Get the source of the encoding parameter.
`byte[]` | `getSourceData()` Get the data used as the input for the encoding parameter source.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`void` | `setSource(long source)` Set the source of the encoding parameter.
`void` | `setSourceData(byte[] sourceData)` Set the data used as the input for the encoding parameter source.
`String` | `toString()` Returns the string representation of this object.

Methods inherited from class iaik.pkcs.pkcs11.parameters.RSAPkcsParameters
`getHashAlgorithm, getMaskGenerationFunction, setHashAlgorithm, setMaskGenerationFunction`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### source_

    protected long source_

  The source of the encoding parameter.

### sourceData_

    protected byte[] sourceData_

  The data used as the input for the encoding parameter source.

Constructor Detail

### RSAPkcsOaepParameters

    public RSAPkcsOaepParameters(Mechanism hashAlgorithm,
                                 long maskGenerationFunction,
                                 long source,
                                 byte[] sourceData)

  Create a new RSAPkcsOaepParameters 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.
  `source` - The source of the encoding parameter. One of the constants defined in the SourceType interface.
  `sourceData` - The data used as the input for the encoding parameter source.
Preconditions
  (hashAlgorithm <> null) and (maskGenerationFunction == MessageGenerationFunctionType.Sha1) and ((source == SourceType.Empty) or (source == SourceType.DataSpecified))
Postconditions

Method Detail

### clone

    public Object clone()

  Create a (deep) clone of this object.

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

### getPKCS11ParamsObject

    public Object getPKCS11ParamsObject()

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

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

### getSource

    public long getSource()

  Get the source of the encoding parameter.

  Returns:
    The source of the encoding parameter.
  Preconditions
  Postconditions

### getSourceData

    public byte[] getSourceData()

  Get the data used as the input for the encoding parameter source.

  Returns:
    The data used as the input for the encoding parameter source.
  Preconditions
  Postconditions

### setSource

    public void setSource(long source)

  Set the source of the encoding parameter. One of the constants defined in the SourceType interface.

  Parameters:
    `source` - The source of the encoding parameter.
  Preconditions
    ((source == SourceType.Empty) or (source == SourceType.DataSpecified))
  Postconditions

### setSourceData

    public void setSourceData(byte[] sourceData)

  Set the data used as the input for the encoding parameter source.

  Parameters:
    `sourceData` - The data used as the input for the encoding parameter source.
  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.

  Overrides:
    `toString` in class `RSAPkcsParameters`
  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 `RSAPkcsParameters`
  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 `RSAPkcsParameters`
  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.