|
For the latest news and information visit The GNU Crypto project |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.crypto.sig.rsa.GnuRSAKey | +--gnu.crypto.sig.rsa.GnuRSAPrivateKey
An object that embodies an RSA private key.
References:
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Constructor Summary | |
GnuRSAPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger e,
java.math.BigInteger d)
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 DSS (Digital Signature Standard) parameter
values as this one. |
java.math.BigInteger |
getCrtCoefficient()
|
byte[] |
getEncoded()
Deprecated. see getEncoded(int). |
byte[] |
getEncoded(int format)
Returns the encoded form of this private key according to the designated format. |
java.math.BigInteger |
getPrimeExponentP()
|
java.math.BigInteger |
getPrimeExponentQ()
|
java.math.BigInteger |
getPrimeP()
|
java.math.BigInteger |
getPrimeQ()
|
java.math.BigInteger |
getPrivateExponent()
|
java.math.BigInteger |
getPublicExponent()
|
static GnuRSAPrivateKey |
valueOf(byte[] k)
A class method that takes the output of the encodePrivateKey()
method of a DSS keypair codec object (an instance implementing
IKeyPairCodec for DSS keys, and re-constructs an
instance of this object. |
Methods inherited from class gnu.crypto.sig.rsa.GnuRSAKey |
getAlgorithm, getFormat, getModulus, getN |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface java.security.Key |
getAlgorithm, getFormat |
Methods inherited from interface java.security.interfaces.RSAKey |
getModulus |
Constructor Detail |
public GnuRSAPrivateKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger e, java.math.BigInteger d)
Trivial constructor.
p
- the modulus first prime divisor.p
- the modulus second prime divisor.e
- the public exponent.d
- the private exponent.Method Detail |
public static GnuRSAPrivateKey valueOf(byte[] k)
A class method that takes the output of the encodePrivateKey()
method of a DSS keypair codec object (an instance implementing
IKeyPairCodec
for DSS keys, and re-constructs an
instance of this object.
k
- the contents of a previously encoded instance of this object.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 java.math.BigInteger getPublicExponent()
getPublicExponent
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeP()
getPrimeP
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeQ()
getPrimeQ
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeExponentP()
getPrimeExponentP
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeExponentQ()
getPrimeExponentQ
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getCrtCoefficient()
getCrtCoefficient
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrivateExponent()
getPrivateExponent
in interface java.security.interfaces.RSAPrivateKey
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public byte[] getEncoded(int format)
Returns the encoded form of this private key according to the designated format.
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 DSS (Digital Signature Standard) parameter
values as this one.
equals
in class GnuRSAKey
obj
- the other non-null DSS 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |