|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-05 |
||||||||
| 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
public class 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.
| Field Summary |
|---|
| Fields inherited from interface java.security.interfaces.RSAPublicKey |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
RSAPublicKey()Empty constructor. |
|
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)Creates a new RSAPublicKey from the specified input stream. |
|
| 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()Returns the algorithm identifier for this key. |
boolean |
getAllowExport()Always returns true. |
ASN1Object |
getContents()Returns the contents of this key. |
byte[] |
getEncoded()Returns the encoded form of this key. |
java.lang.String |
getFormat()Returns a string which indicates the format of this object's encoding. |
java.math.BigInteger |
getPublicExponent() |
void |
initialize(AlgorithmIdentifier algID, ASN1Object contents)Initializes this instance from the given algorithm paramters and key 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. |
java.lang.String |
toString()Returns a string representation of this object. |
| Methods inherited from class oracle.security.crypto.core.RSAKey |
|---|
assertAllowExport, getAlgorithm, getBitLength, getExponent, getModulus, modulusLength, readExternal, setBytes, setModulusExponent, writeExternal |
| 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 |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Methods inherited from interface java.security.interfaces.RSAKey |
|---|
getModulus |
| Constructor Detail |
|---|
public RSAPublicKey()
public RSAPublicKey(byte[] key)
throws java.io.IOException
key - DER-encoding of an RSA public keyjava.io.IOException
public RSAPublicKey(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
public RSAPublicKey(java.math.BigInteger mod,
java.math.BigInteger exp)
mod - The modulus.exp - The exponent.| Method Detail |
|---|
public java.math.BigInteger getPublicExponent()
getPublicExponent in interface java.security.interfaces.RSAPublicKeypublic byte[] getEncoded()
KeygetEncoded in interface java.security.Keypublic boolean getAllowExport()
true.FIPS_140_2.getAllowKeyExport()public java.lang.String getFormat()
getFormat in interface java.security.Keypublic void erase()
Keys can be erased multiple times with no consequence.
erase in class RSAKeypublic void finalize()
Note: There is no guarantee of when, if ever, finalize will be invoked by the Java runtime.
finalize in class java.lang.Objectpublic java.lang.Object clone()
RSAPublicKey instance.clone in class RSAKey
public void initialize(AlgorithmIdentifier algID,
ASN1Object contents)
throws AlgorithmIdentifierException,
InvalidInputException
PublicKeyAlgorithmIdentifierExceptionInvalidInputExceptionpublic AlgorithmIdentifier getAlgID()
PublicKeypublic ASN1Object getContents()
PublicKeypublic boolean isPublic()
isPublic in class RSAKeytrue.public java.lang.String toString()
toString in class java.lang.Object
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
|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||