Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


oracle.security.crypto.core
Class AlgorithmIdentifier

java.lang.Object
  extended byoracle.security.crypto.core.AlgorithmIdentifier

All Implemented Interfaces:
ASN1Object, java.lang.Cloneable, Streamable
Direct Known Subclasses:
CBCAlgorithmIdentifier, OAEPAlgorithmIdentifier, PBMacAlgID, RC2AlgorithmIdentifier

public class AlgorithmIdentifier
extends java.lang.Object
implements ASN1Object, java.lang.Cloneable

This class encapsulates an AlgorithmIdentifier object, as defined in X.509 and as used in several other standards, such as PKCS.

Instances consist of an OID which identifies the algorithm, together with an optional parameters object, which can be any ASN.1 object.

Instances are considered equal if they have the same OID and parameters, with the proviso that no distinction is made between the parameters being encoded as the ASN.1 NULL object and the parameters being omitted entirely.


Constructor Summary
protected AlgorithmIdentifier()
           
  AlgorithmIdentifier(ASN1ObjectID oid)
          Creates a new algorithm identifier without parameters.
  AlgorithmIdentifier(ASN1ObjectID oid, ASN1Object parameters)
          Creates a new algorithm identifier with the given algorithm OID and parameters.
  AlgorithmIdentifier(ASN1ObjectID oid, boolean useNULL)
          Creates a new algorithm identifier with the given algorithm OID and no parameters.
  AlgorithmIdentifier(ASN1Sequence s)
           
  AlgorithmIdentifier(java.io.InputStream is)
           

 

Method Summary
 java.lang.Object clone()
          Creates a deep copy of this AlgorithmIdentifier object.
 boolean equals(java.lang.Object o)
           
 ASN1ObjectID getOID()
          Returns the algorithm OID.
 ASN1Object getParameters()
          Returns the algorithm parameters, or null if they are not present.
 int hashCode()
           
 void input(java.io.InputStream is)
          Inputs this object from the specified input stream.
 int length()
          Length of this object's encoding.
 void output(java.io.OutputStream os)
          Outputs this object to the specified output stream.
 java.lang.String toString()
           

 

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

 

Constructor Detail

AlgorithmIdentifier

public AlgorithmIdentifier(ASN1ObjectID oid,
                           ASN1Object parameters)
Creates a new algorithm identifier with the given algorithm OID and parameters.
Parameters:
oid - the OID which identifies the algorithm
parameters - the algorithm parameters

AlgorithmIdentifier

public AlgorithmIdentifier(ASN1ObjectID oid,
                           boolean useNULL)
Creates a new algorithm identifier with the given algorithm OID and no parameters. The flag indicates whether to omit the parameters altogether or insert an ASN.1 NULL object.
Parameters:
oid - the OID which identifies the algorithm
useNULL -

AlgorithmIdentifier

public AlgorithmIdentifier(ASN1ObjectID oid)
Creates a new algorithm identifier without parameters. An ASN.1 NULL type will be used for the parameters field.

AlgorithmIdentifier

public AlgorithmIdentifier(java.io.InputStream is)
                    throws java.io.IOException

AlgorithmIdentifier

public AlgorithmIdentifier(ASN1Sequence s)
                    throws ASN1FormatException

AlgorithmIdentifier

protected AlgorithmIdentifier()

Method Detail

getOID

public ASN1ObjectID getOID()
Returns the algorithm OID.

getParameters

public ASN1Object getParameters()
Returns the algorithm parameters, or null if they are not present.

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

clone

public java.lang.Object clone()
Creates a deep copy of this AlgorithmIdentifier object.

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Description copied from interface: Streamable
Inputs this object from the specified input stream.
Specified by:
input in interface Streamable
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Description copied from interface: Streamable
Outputs this object to the specified output stream.
Specified by:
output in interface Streamable
Throws:
java.io.IOException

length

public int length()
Description copied from interface: Streamable
Length of this object's encoding.
Specified by:
length in interface Streamable

Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


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