|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.security.crypto.core.DSAPublicKey
A DSA public key.
The OID used to identify the key algorithm may be set via setKeyAlgOID. The encoding used for keys of this class is based on the SubjectPublicKeyInfo structure of X.509, and is compatible with that used in JDK 1.2.
DSA, Serialized Form| Constructor Summary | |
DSAPublicKey()Makes a new, uninitialized instance. |
|
DSAPublicKey(ASN1Sequence s) |
|
DSAPublicKey(java.math.BigInteger y, DSAParams params)Makes a new instance with the given set of parameters and value of y. |
|
DSAPublicKey(byte[] data)Makes a new instance by reading its encoding from the given byte array. |
|
DSAPublicKey(java.io.InputStream is)Makes a new instance by reading its encoding from the given input stream. |
|
| Method Summary | |
java.lang.Object |
clone()Creates a deep copy of this DSAPublicKey instance. |
void |
erase()Erases the key material making the key un-usable. |
void |
finalize()Erases this object prior to being reclaimed by the garbage collector. |
AlgorithmIdentifier |
getAlgID() |
java.lang.String |
getAlgorithm()Gets the algorithm name for this key. |
int |
getBitLength()Returns the number of bits needed to represent the DSAPublicKey's public component P. |
ASN1Object |
getContents() |
byte[] |
getEncoded()Outputs the encoding of this object to a byte array. |
java.lang.String |
getFormat()Returns a string which indicates the format of this object's encoding. |
ASN1ObjectID |
getKeyAlgOID()Returns the key algorithm OID. |
DSAParams |
getParams()Returns the DSA algorithm parameters for this public key. |
java.math.BigInteger |
getY()Gets y. |
void |
initialize(AlgorithmIdentifier algID, ASN1Object contents) |
void |
input(ASN1Sequence s) |
void |
input(java.io.InputStream is)Inputs a DSAPublicKey object by reading its encoding from the given input stream. |
int |
length()Gets the length of the encoding of this object. |
void |
output(java.io.OutputStream os)Outputs encoding of this object to a given output stream. |
ASN1Sequence |
outputASN1() |
void |
readExternal(java.io.ObjectInput is) |
void |
setKeyAlgOID(ASN1ObjectID oid)Sets the key algorithm OID. |
void |
setParams(DSAParams params)Sets the DSA algorithm parameters for this public key. |
java.lang.String |
toString()Returns a string which describes this object. |
void |
writeExternal(java.io.ObjectOutput os) |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DSAPublicKey()
public DSAPublicKey(java.math.BigInteger y,
DSAParams params)
y - the value of yparams - the DSAParams of this DSAPublicKey
public DSAPublicKey(java.io.InputStream is)
throws java.io.IOException
is - the input stream from from which this object will be readjava.io.IOException - If an input exception occured
public DSAPublicKey(byte[] data)
throws java.io.IOException
data - the byte array from which this object will be readjava.io.IOException - If an input exception occured
public DSAPublicKey(ASN1Sequence s)
throws java.io.IOException
| Method Detail |
public void initialize(AlgorithmIdentifier algID,
ASN1Object contents)
throws AlgorithmIdentifierException,
InvalidInputException
initialize in interface PublicKeyAlgorithmIdentifierExceptionInvalidInputExceptionpublic AlgorithmIdentifier getAlgID()
getAlgID in interface PublicKeypublic ASN1Object getContents()
getContents in interface PublicKeypublic ASN1ObjectID getKeyAlgOID()
DSA.dsaKeyOID, is returned.DSA.dsaKeyOIDpublic void setKeyAlgOID(ASN1ObjectID oid)
oid - the key algorithm OIDpublic java.math.BigInteger getY()
public void setParams(DSAParams params)
public DSAParams getParams()
public void input(java.io.InputStream is)
throws java.io.IOException
DSAPublicKey object by reading its encoding from the given input stream.input in interface Streamableis - the input stream from which this object will be readjava.io.IOException - If an input exception occured.
public void input(ASN1Sequence s)
throws java.io.IOException
java.io.IOException
public void output(java.io.OutputStream os)
throws java.io.IOException
output in interface Streamableos - the output stream to which the encoding of this object will be writtenjava.io.IOException - If an output exception occured.public ASN1Sequence outputASN1()
public int length()
length in interface Streamablepublic java.lang.String getAlgorithm()
getAlgorithm in interface Keypublic byte[] getEncoded()
getEncoded in interface Keypublic int getBitLength()
0 will be returned if the key has not been initialized.
getBitLength in interface Keypublic java.lang.String toString()
public java.lang.String getFormat()
getFormat in interface Keypublic void erase()
Keys can be erased multiple times with no consequence.
erase in interface Keypublic void finalize()
Note: There is no guarantee of when, if ever, finalize will be invoked by the Java runtime.
public java.lang.Object clone()
DSAPublicKey instance.clone in interface Key
public void writeExternal(java.io.ObjectOutput os)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput is)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException
|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||