|
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
An abstract class for RSA keys. Input and output is done using ASN.1 DER format.
RSAPrivateKey
, RSAPublicKey
Constructor Summary | |
protected |
RSAKey() |
protected |
RSAKey(ASN1Sequence s) |
protected |
RSAKey(java.math.BigInteger mod, java.math.BigInteger exp) |
protected |
RSAKey(byte[] key) |
protected |
RSAKey(java.io.InputStream is) |
Method Summary | |
abstract java.lang.Object |
clone() Creates a deep clone of this RSAKey object. |
void |
erase() Erases the data stored in the key. |
java.lang.String |
getAlgorithm() Returns the algorithm for which this key is primarily used. |
int |
getBitLength() Returns the number of bits needed to represent the RSAKey's modulus. |
byte[] |
getEncoded() Returns the encoded form of this key. |
java.math.BigInteger |
getExponent() |
java.math.BigInteger |
getModulus() |
abstract boolean |
isPublic() Returns true if this is a public key, false if it's a private key. |
int |
modulusLength() The length of the modulus in bytes. |
void |
setBytes(byte[] key) Set bytes of the key. |
void |
setModulusExponent(java.math.BigInteger mod, java.math.BigInteger exp) |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.security.crypto.core.Key |
getFormat |
Methods inherited from interface oracle.security.crypto.util.Streamable |
input, length, output |
Constructor Detail |
protected RSAKey()
protected RSAKey(byte[] key) throws java.io.IOException
protected RSAKey(java.io.InputStream is) throws java.io.IOException
protected RSAKey(ASN1Sequence s) throws java.io.IOException
protected RSAKey(java.math.BigInteger mod, java.math.BigInteger exp)
Method Detail |
public java.lang.String getAlgorithm()
Key
getAlgorithm
in interface Key
public void setBytes(byte[] key) throws java.io.IOException
java.io.IOException
public int modulusLength()
public java.math.BigInteger getModulus()
public java.math.BigInteger getExponent()
public void setModulusExponent(java.math.BigInteger mod, java.math.BigInteger exp)
public byte[] getEncoded()
Key
getEncoded
in interface Key
public int getBitLength()
0 will be returned if the key has not been initialized.
getBitLength
in interface Key
public abstract boolean isPublic()
true
if this is a public key, false
if it's a private key.public abstract java.lang.Object clone()
RSAKey
object.clone
in interface Key
public void erase()
erase
in interface Key
|
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 |