|
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.RSAKey
oracle.security.crypto.core.RSAPublicKey
An RSA public key.
RSA public keys are output in X.509 SubjectPublicKeyInfo format, and this is also the preferred format for input. However, for backwards compatibility reasons, the PKCS #1 RSAPublicKey format is recognized for input as well.
| Constructor Summary | |
RSAPublicKey() |
|
RSAPublicKey(java.math.BigInteger mod, java.math.BigInteger exp)Constructs a new RSA public key with the given parameters. |
|
RSAPublicKey(byte[] key)Constructs a new RSA public key from the given encoding. |
|
RSAPublicKey(java.io.InputStream is) |
|
| Method Summary | |
java.lang.Object |
clone()Creates a deep copy of this RSAPublicKey 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() |
ASN1Object |
getContents() |
java.lang.String |
getFormat()Returns a string which indicates the format of this object's encoding. |
void |
initialize(AlgorithmIdentifier algID, ASN1Object contents) |
void |
input(java.io.InputStream is)Reads an RSA private key from the specified input stream. |
boolean |
isPublic()Indicates whether this is a public key. |
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) |
java.lang.String |
toString()Returns a string representation of this object. |
void |
writeExternal(java.io.ObjectOutput os) |
| Methods inherited from class oracle.security.crypto.core.RSAKey |
getAlgorithm, getBitLength, getEncoded, getExponent, getModulus, modulusLength, setBytes, setModulusExponent |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.security.crypto.core.Key |
getAlgorithm, getBitLength, getEncoded |
| Constructor Detail |
public RSAPublicKey()
public RSAPublicKey(byte[] key)
throws java.io.IOException
key - DER-encoding of an RSA public key
public RSAPublicKey(java.io.InputStream is)
throws java.io.IOException
public RSAPublicKey(java.math.BigInteger mod,
java.math.BigInteger exp)
mod - the modulusexp - the exponent| Method Detail |
public void initialize(AlgorithmIdentifier algID,
ASN1Object contents)
throws AlgorithmIdentifierException,
InvalidInputException
initialize in interface PublicKeyAlgorithmIdentifierExceptionInvalidInputExceptionpublic AlgorithmIdentifier getAlgID()
getAlgID in interface PublicKeypublic java.lang.String getFormat()
getFormat in interface Keypublic ASN1Object getContents()
getContents in interface PublicKeypublic boolean isPublic()
isPublic in class RSAKeytruepublic java.lang.String toString()
public void erase()
Keys can be erased multiple times with no consequence.
erase in interface Keyerase in class RSAKeypublic void finalize()
Note: There is no guarantee of when, if ever, finalize will be invoked by the Java runtime.
public java.lang.Object clone()
RSAPublicKey instance.clone in interface Keyclone in class RSAKey
public void input(java.io.InputStream is)
throws java.io.IOException
input in interface Streamablejava.io.IOException
public void output(java.io.OutputStream os)
throws java.io.IOException
Streamableoutput in interface Streamablejava.io.IOExceptionpublic int length()
Streamablelength in interface Streamable
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 | |||||||||