Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.core
Class OAEPAlgorithmIdentifier

`java.lang.Object
oracle.security.crypto.core.AlgorithmIdentifier
oracle.security.crypto.core.OAEPAlgorithmIdentifier`

All Implemented Interfaces:
  ASN1Object, java.lang.Cloneable, Streamable

public class OAEPAlgorithmIdentifier
extends AlgorithmIdentifier

This class provides an API for encapsulating the parameters of an RSAES-OAEP `AlgorithmIdentifier` and making them easily accessible.

Note: The definition and ASN.1 structure for the OAEP (Optimal Asymmetric Encryption Padding) AlgorithmIdentifier can be found in PKCS#1 version 2.0.

Since:
  2.2
See Also:
  `RSApkcs1`

Constructor Summary
`OAEPAlgorithmIdentifier()` Creates a new OAEPAlgorithmIdentifier with the params:
`OAEPAlgorithmIdentifier(AlgorithmIdentifier hashFunc, AlgorithmIdentifier maskGenFunc, AlgorithmIdentifier pSourceFunc)` Instantiates a new OAEPAlgorithmIdentifier by encoding the given params.
`OAEPAlgorithmIdentifier(ASN1Object params)` Instantiates a new OAEPAlgorithmIdentifier by decoding the given params.
`OAEPAlgorithmIdentifier(java.io.InputStream in)` Instantiate a new OAEPAlgorithmIdentifier by reading in the `AlgorithmIdentifier` from the stream and decoring the resulting parameters.

Method Summary
`java.lang.Object` | `clone()` Creates a deep copy of this `OAEPAlgorithmIdentifier` object.
`AlgorithmIdentifier` | `getHashFunc()` Returns a clone of the hash function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
`AlgorithmIdentifier` | `getMaskGenFunc()` Returns a clone of the mask generation function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
`AlgorithmIdentifier` | `getPSourceFunc()` Returns the p source function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
`void` | `input(java.io.InputStream in)` Reads in the ASN1 representation from the stream and attempts to decode the parameters.

Methods inherited from class oracle.security.crypto.core.AlgorithmIdentifier
`equals, getOID, getParameters, hashCode, length, output, toString`

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

Constructor Detail

### OAEPAlgorithmIdentifier

    public OAEPAlgorithmIdentifier(ASN1Object params)
                            throws AlgorithmIdentifierException

  Instantiates a new OAEPAlgorithmIdentifier by decoding the given params.
Parameters:
  `params` - are the parameters to be held and decoded for this `AlgorithmIdentifier`
Throws:
  `AlgorithmIdentifierException` - is thrown if there is a problem decoding the parameters.

### OAEPAlgorithmIdentifier

    public OAEPAlgorithmIdentifier()

  Creates a new OAEPAlgorithmIdentifier with the params:

  hash function | SHA1
  mask generation function | MGF1 with SHA1
  p source function | pSpecifiedEmptyIdentifier

### OAEPAlgorithmIdentifier

    public OAEPAlgorithmIdentifier(AlgorithmIdentifier hashFunc,
                                   AlgorithmIdentifier maskGenFunc,
                                   AlgorithmIdentifier pSourceFunc)

  Instantiates a new OAEPAlgorithmIdentifier by encoding the given params.
Parameters:
  `hashFunc` - is the `AlgorithmIdentifier` of the hash function detailed in the RSAES-OAEP-params ASN1 definition.
  `maskGenFunc` - is the `AlgorithmIdentifier` of the mask generation function detailed in the RSAES-OAEP-param ASN1 definition.
  `pSourceFunc` - is the `AlgorithmIdentifier` that indicates the source function to use to generate p.

### OAEPAlgorithmIdentifier

    public OAEPAlgorithmIdentifier(java.io.InputStream in)
                            throws java.io.IOException

  Instantiate a new OAEPAlgorithmIdentifier by reading in the `AlgorithmIdentifier` from the stream and decoring the resulting parameters.
Parameters:
  `in` - is the `InputStream` we will read the `AlgorithmIdentifier` from.
Throws:
  `java.io.IOException` - is thrown if there is a problem reading the `AlgorithmIdentifier` in from the stream or if there is a problem decoding the parameters.

Method Detail

### getHashFunc

    public AlgorithmIdentifier getHashFunc()

  Returns a clone of the hash function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
  Returns:
    hash function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.

### getMaskGenFunc

    public AlgorithmIdentifier getMaskGenFunc()

  Returns a clone of the mask generation function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
  Returns:
    mask generation function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.

### getPSourceFunc

    public AlgorithmIdentifier getPSourceFunc()

  Returns the p source function `AlgorithmIdentifier` held by this `AlgorithmIdentifier`.
  Returns:
    the p source function for this `AlgorithmIdentifier`.

### input

    public void input(java.io.InputStream in)
               throws java.io.IOException

  Reads in the ASN1 representation from the stream and attempts to decode the parameters.
  Specified by:
    `input` in interface `Streamable`
  Overrides:
    `input` in class `AlgorithmIdentifier`
  Parameters:
    `in` - is the `InputStream` we will read the `AlgorithmIdentifier` from.
  Throws:
    `java.io.IOException` - is thrown if there is a problem reading the `AlgorithmIdentifier` in from the stream or decoding the parameters.

### clone

    public java.lang.Object clone()

  Creates a deep copy of this `OAEPAlgorithmIdentifier` object.
  Overrides:
    `clone` in class `AlgorithmIdentifier`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.