|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.AlgorithmIdentifier
public class AlgorithmIdentifier
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 provison that no distinction is made between the parameters being encoded as the ASN.1 NULL object and the parameters being omitted entirely.
Constructor Summary | |
---|---|
AlgorithmIdentifier() Creates a new empty instance. |
|
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) Creates a new AlgorithmIdentifier object from the specified ASN1Sequence. |
|
AlgorithmIdentifier(java.io.InputStream is) Creates a new AlgorithmIdentifier object from the specified input stream. |
Method Summary | |
---|---|
java.lang.Object |
clone() Creates a deep copy of this AlgorithmIdentifier object. |
boolean |
equals(java.lang.Object o) Tests if the Object passed as a parameter is equal to this AlgorithmIdentifier object. |
ASN1ObjectID |
getOID() Returns the algorithm OID. |
ASN1Object |
getParameters() Returns the algorithm parameters, or null if they are not present. |
int |
hashCode() Returns the hash code value of this object. |
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. |
void |
readExternal(java.io.ObjectInput is) Reads the input stream and initializes the algorithm identifier. |
java.lang.String |
toString() Returns a representation of this algorithm identifier object. |
void |
writeExternal(java.io.ObjectOutput os) Writes to the output stream the DER encoding of this object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AlgorithmIdentifier(ASN1ObjectID oid, ASN1Object parameters)
oid
- the OID which identifies the algorithmparameters
- the algorithm parameterspublic AlgorithmIdentifier(ASN1ObjectID oid, boolean useNULL)
oid
- the OID which identifies the algorithmuseNULL
-public AlgorithmIdentifier(ASN1ObjectID oid)
public AlgorithmIdentifier(java.io.InputStream is) throws java.io.IOException
AlgorithmIdentifier
object from the specified input stream.
is
- The stream from which the algorithm identifier will be created.java.io.IOException
public AlgorithmIdentifier(ASN1Sequence s) throws ASN1FormatException
AlgorithmIdentifier
object from the specified ASN1Sequence.
s
- The ASN1Sequence from which the algorithm identifier will be created.ASN1FormatException
public AlgorithmIdentifier()
Method Detail |
---|
public ASN1ObjectID getOID()
public ASN1Object getParameters()
null
if they are not present.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
AlgorithmIdentifier
object.clone
in class java.lang.Object
public void input(java.io.InputStream is) throws java.io.IOException
Streamable
input
in interface Streamable
java.io.IOException
public void output(java.io.OutputStream os) throws java.io.IOException
Streamable
output
in interface Streamable
java.io.IOException
public int length()
Streamable
length
in interface Streamable
public void writeExternal(java.io.ObjectOutput os) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
os
- The output stream to write the encoding to.java.io.IOException
public void readExternal(java.io.ObjectInput is) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
is
- The stream to read from.java.io.IOException
java.lang.ClassNotFoundException
|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |