|
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.Objectgnu.crypto.key.dh.GnuDHKey
gnu.crypto.key.dh.GnuDHPrivateKey
public class GnuDHPrivateKey
An implementation of the Diffie-Hellman private key.
Reference:
Field Summary |
---|
Fields inherited from class gnu.crypto.key.dh.GnuDHKey |
---|
g, p, q |
Fields inherited from interface javax.crypto.interfaces.DHPrivateKey |
---|
serialVersionUID |
Constructor Summary | |
---|---|
GnuDHPrivateKey(BigInteger q,
BigInteger p,
BigInteger g,
BigInteger x)
|
Method Summary | |
---|---|
byte[] |
getEncoded()
Deprecated. see getEncoded(int). |
byte[] |
getEncoded(int format)
Returns the encoded form of this private key according to the designated format. |
BigInteger |
getX()
|
static GnuDHPrivateKey |
valueOf(byte[] k)
A class method that takes the output of the encodePrivateKey()
method of a DH keypair codec object (an instance implementing
IKeyPairCodec for DH keys, and re-constructs an instance of this
object. |
Methods inherited from class gnu.crypto.key.dh.GnuDHKey |
---|
equals, getAlgorithm, getFormat, getParams, getQ |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.crypto.interfaces.DHKey |
---|
getParams |
Methods inherited from interface java.security.Key |
---|
getAlgorithm, getFormat |
Constructor Detail |
---|
public GnuDHPrivateKey(BigInteger q, BigInteger p, BigInteger g, BigInteger x)
Method Detail |
---|
public static GnuDHPrivateKey valueOf(byte[] k)
A class method that takes the output of the encodePrivateKey()
method of a DH keypair codec object (an instance implementing
IKeyPairCodec
for DH 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.
IllegalArgumentException
- if the byte sequence does not
represent a valid encoding of an instance of this object.public byte[] getEncoded()
getEncoded
in interface Key
public BigInteger getX()
getX
in interface DHPrivateKey
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.
IllegalArgumentException
- if the format is not supported.DHKeyPairRawCodec
|
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 |