Skip navigation links

Oracle Security Developer Tools Crypto FIPS Java API Reference
11g (11.1.1)

E10696-02


oracle.security.crypto.core
Class OAEPAlgorithmIdentifier

java.lang.Object
  extended by oracle.security.crypto.core.AlgorithmIdentifier
      extended by oracle.security.crypto.core.OAEPAlgorithmIdentifier

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, ASN1Object, 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, Serialized Form

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.
OAEPAlgorithmIdentifier(java.lang.String digest, byte[] source)
           

 

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, readExternal, toString, writeExternal

 

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.lang.String digest,
                               byte[] source)

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

Skip navigation links

Oracle Security Developer Tools Crypto FIPS Java API Reference
11g (11.1.1)

E10696-02


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