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 RSAPkcsParameters

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

All Implemented Interfaces:
  Cloneable, Parameters

Direct Known Subclasses:
  RSAPkcsOaepParameters, RSAPkcsPssParameters

public abstract class RSAPkcsParameters
extends Object
implements Parameters

This abstract class encapsulates parameters for the RSA PKCS mechanisms Mechanism.RSA_PKCS_OAEP and Mechanism.RSA_PKCS_PSS.

Invariants
  (hashAlgorithm_ <> null) and (maskGenerationFunction_ == MessageGenerationFunctionType.Sha1)

Nested Class Summary
`static interface` | `RSAPkcsParameters.MessageGenerationFunctionType` This interface defines the available message generation function types as defined by PKCS#11: CKG_MGF1_SHA1, CKG_MGF1_SHA256, CKG_MGF1_SHA384 and CKG_MGF1_SHA512.

Field Summary
`protected Mechanism` | `hashAlgorithm_` The message digest algorithm used to calculate the digest of the encoding parameter.
`protected long` | `maskGenerationFunction_` The mask to apply to the encoded block.

Constructor Summary
`protected` | `RSAPkcsParameters(Mechanism hashAlgorithm, long maskGenerationFunction)` Create a new RSAPkcsarameters 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.
`Mechanism` | `getHashAlgorithm()` Get the message digest algorithm used to calculate the digest of the encoding parameter.
`long` | `getMaskGenerationFunction()` Get the mask to apply to the encoded block.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`void` | `setHashAlgorithm(Mechanism hashAlgorithm)` Set the message digest algorithm used to calculate the digest of the encoding parameter.
`void` | `setMaskGenerationFunction(long maskGenerationFunction)` Set the mask function to apply to the encoded block.
`String` | `toString()` Returns the string representation of this object.

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

Methods inherited from interface iaik.pkcs.pkcs11.parameters.Parameters
`getPKCS11ParamsObject`

Field Detail

### hashAlgorithm_

    protected Mechanism hashAlgorithm_

  The message digest algorithm used to calculate the digest of the encoding parameter.

### maskGenerationFunction_

    protected long maskGenerationFunction_

  The mask to apply to the encoded block.

Constructor Detail

### RSAPkcsParameters

    protected RSAPkcsParameters(Mechanism hashAlgorithm,
                                long maskGenerationFunction)

  Create a new RSAPkcsarameters 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.
Preconditions
  (hashAlgorithm <> null) and (maskGenerationFunction == MessageGenerationFunctionType.Sha1)
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 RSAPkcsParameters) and (result.equals(this))

### getHashAlgorithm

    public Mechanism getHashAlgorithm()

  Get the message digest algorithm used to calculate the digest of the encoding parameter.

  Returns:
    The message digest algorithm used to calculate the digest of the encoding parameter.
  Preconditions
  Postconditions
    (result <> null)

### getMaskGenerationFunction

    public long getMaskGenerationFunction()

  Get the mask to apply to the encoded block.

  Returns:
    The mask to apply to the encoded block.
  Preconditions
  Postconditions

### setHashAlgorithm

    public void setHashAlgorithm(Mechanism hashAlgorithm)

  Set the message digest algorithm used to calculate the digest of the encoding parameter.

  Parameters:
    `hashAlgorithm` - The message digest algorithm used to calculate the digest of the encoding parameter.
  Preconditions
    (hashAlgorithm <> null)
  Postconditions

### setMaskGenerationFunction

    public void setMaskGenerationFunction(long maskGenerationFunction)

  Set the mask function to apply to the encoded block. One of the constants defined in the MessageGenerationFunctionType interface.

  Parameters:
    `maskGenerationFunction` - The mask to apply to the encoded block.
  Preconditions
    (maskGenerationFunction == MessageGenerationFunctionType.Sha1)
  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.