|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-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 keypublic RSAPublicKey(java.io.InputStream is) throws java.io.IOException
public RSAPublicKey(java.math.BigInteger mod, java.math.BigInteger exp)
mod
- the modulusexp
- the exponentMethod Detail |
public void initialize(AlgorithmIdentifier algID, ASN1Object contents) throws AlgorithmIdentifierException, InvalidInputException
initialize
in interface PublicKey
AlgorithmIdentifierException
InvalidInputException
public AlgorithmIdentifier getAlgID()
getAlgID
in interface PublicKey
public java.lang.String getFormat()
getFormat
in interface Key
public ASN1Object getContents()
getContents
in interface PublicKey
public boolean isPublic()
isPublic
in class RSAKey
true
public java.lang.String toString()
public void erase()
Keys can be erased multiple times with no consequence.
erase
in interface Key
erase
in class RSAKey
public 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 Key
clone
in class RSAKey
public void input(java.io.InputStream is) throws java.io.IOException
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
java.io.IOException
public void readExternal(java.io.ObjectInput is) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |