|
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.DHKey
oracle.security.crypto.core.DHPrivateKey
*** For internal use only *** A Diffie-Hellman private key.
The Diffie-Hellman private key contains a DHParams and the private key value x. The encoding is based on the PKCS #8 type PrivateKeyInfo.
Status: Provisional (may be changed in future releases.)
DHKey, DHPublicKey, DHParams, Serialized Form| Field Summary |
| Fields inherited from class oracle.security.crypto.core.DHKey |
params |
| Constructor Summary | |
DHPrivateKey()Constructs a new, uninitialized instance. |
|
DHPrivateKey(java.math.BigInteger x, DHParams params)Constructs a new instance with the give value of x and DHParams. |
|
DHPrivateKey(java.io.File f)Constructs a new instance by reading its encoding from the given file. |
|
DHPrivateKey(java.io.InputStream is)Constructs a new instance by reading its encoding from the given InputStream. |
|
| Method Summary | |
java.lang.Object |
clone()Performs a deep clone of the Key instance. |
void |
erase()Erases the key material, making the key un-usable. |
AlgorithmIdentifier |
getAlgID()Returns the algorithm identifier for this key. |
ASN1Object |
getContents()Returns the contents of this key. |
java.lang.String |
getFormat()Returns a string which indicates the format of this object's encoding. |
java.math.BigInteger |
getX()Gets the private key value x. |
void |
initialize(AlgorithmIdentifier algID, ASN1Object contents)Initializes this instance from the given algorithm paramters and key contents. |
void |
input(java.io.InputStream is)Inputs a DHPrivateKey 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 the ASN1 encoding of this object to a given output stream. |
void |
setParams(DHParams params)Sets the parameters for the Diffie-Hellman key. |
java.lang.String |
toString()Returns a string representation of this object. |
| Methods inherited from class oracle.security.crypto.core.DHKey |
getAlgorithm, getBitLength, getEncoded, getParams, readExternal, writeExternal |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.security.crypto.core.Key |
getAlgorithm, getBitLength, getEncoded |
| Constructor Detail |
public DHPrivateKey()
public DHPrivateKey(java.math.BigInteger x,
DHParams params)
DHParams.x - xparams - the DHParams of this DHPrivateKey
public DHPrivateKey(java.io.InputStream is)
throws java.io.IOException
is - the InputStream for the DHPrivateKey objectjava.io.IOException - If an input exception occured.
public DHPrivateKey(java.io.File f)
throws java.io.IOException
f - the file stores a DHPrivateKey objectjava.io.IOException - If an input exception occured.| Method Detail |
public void initialize(AlgorithmIdentifier algID,
ASN1Object contents)
throws AlgorithmIdentifierException,
InvalidInputException
PrivateKeyinitialize in interface PrivateKeyAlgorithmIdentifierExceptionInvalidInputExceptionpublic AlgorithmIdentifier getAlgID()
PrivateKeygetAlgID in interface PrivateKeypublic ASN1Object getContents()
PrivateKeygetContents in interface PrivateKeypublic java.lang.String getFormat()
getFormat in interface Keypublic void erase()
KeyKeys can be erased multiple times with no consequence.
erase in interface Keypublic java.lang.Object clone()
Keyclone in interface Keyclone in class DHKeypublic void setParams(DHParams params)
DHKeysetParams in class DHKeyparams - An instance of DHParams.public java.math.BigInteger getX()
public java.lang.String toString()
public void input(java.io.InputStream is)
throws java.io.IOException
DHPrivateKey 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 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 written.java.io.IOException - If an output exception occured.public int length()
length in interface Streamable
|
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 | |||||||||