|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.crypto.key.rsa.GnuRSAKey gnu.crypto.key.rsa.GnuRSAPublicKey
An object that encapsulates an RSA public key.
References:
Field Summary |
Fields inherited from interface java.security.PublicKey |
serialVersionUID |
Constructor Summary | |
GnuRSAPublicKey(java.math.BigInteger n,
java.math.BigInteger e)
Trivial constructor. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if the designated object is an instance of
this class and has the same RSA parameter values as this one. |
byte[] |
getEncoded(int format)
Returns the encoded form of this public key according to the designated format. |
static GnuRSAPublicKey |
valueOf(byte[] k)
A class method that takes the output of the encodePublicKey()
method of an RSA keypair codec object (an instance implementing
IKeyPairCodec for RSA keys, and re-constructs an
instance of this object. |
Methods inherited from class gnu.crypto.key.rsa.GnuRSAKey |
getAlgorithm, getE, getEncoded, getFormat, getModulus, getN, getPublicExponent |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
Methods inherited from interface java.security.interfaces.RSAPublicKey |
getPublicExponent |
Methods inherited from interface java.security.interfaces.RSAKey |
getModulus |
Constructor Detail |
public GnuRSAPublicKey(java.math.BigInteger n, java.math.BigInteger e)
Trivial constructor.
n
- the modulus.e
- the public exponent.Method Detail |
public static GnuRSAPublicKey valueOf(byte[] k)
A class method that takes the output of the encodePublicKey()
method of an RSA keypair codec object (an instance implementing
IKeyPairCodec
for RSA keys, and re-constructs an
instance of this object.
k
- the contents of a previously encoded instance of this object.
java.lang.ArrayIndexOutOfBoundsException
- if there is not enough bytes, in
k
, to represent a valid encoding of an instance of this object.
java.lang.IllegalArgumentException
- if the byte sequence does not represent a
valid encoding of an instance of this object.public byte[] getEncoded(int format)
Returns the encoded form of this public key according to the designated format.
getEncoded
in class GnuRSAKey
format
- the desired format identifier of the resulting encoding.
java.lang.IllegalArgumentException
- if the format is not supported.RSAKeyPairRawCodec
public boolean equals(java.lang.Object obj)
Returns true
if the designated object is an instance of
this class and has the same RSA parameter values as this one.
equals
in class GnuRSAKey
obj
- the other non-null RSA key to compare to.
true
if the designated object is of the same type and
value as this one.
|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |