|
|||||||||
Home >> All >> gnu >> javax >> crypto >> key >> [ dh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
gnu.javax.crypto.key.dh
Class GnuDHPrivateKey

java.lang.Objectgnu.javax.crypto.key.dh.GnuDHKey
gnu.javax.crypto.key.dh.GnuDHPrivateKey
- All Implemented Interfaces:
- javax.crypto.interfaces.DHKey, javax.crypto.interfaces.DHPrivateKey, java.security.Key, java.security.PrivateKey, java.io.Serializable
- public class GnuDHPrivateKey
- extends GnuDHKey
- implements javax.crypto.interfaces.DHPrivateKey
- extends GnuDHKey
An implementation of the Diffie-Hellman private key.
Reference:
- Diffie-Hellman Key
Agreement Method
Eric Rescorla.
Field Summary | |
private java.math.BigInteger |
x
The private exponent. |
Fields inherited from class gnu.javax.crypto.key.dh.GnuDHKey |
defaultFormat, g, p, q |
Fields inherited from interface javax.crypto.interfaces.DHPrivateKey |
serialVersionUID |
Constructor Summary | |
GnuDHPrivateKey(java.math.BigInteger q,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x)
Convenience constructor. |
|
GnuDHPrivateKey(int preferredFormat,
java.math.BigInteger q,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x)
Constructs a new instance of GnuDHPrivateKey given the
designated parameters. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if the designated object is an instance of
javax.crypto.interfaces.DHPrivateKey and has the same parameter values as this one. |
byte[] |
getEncoded(int format)
Returns the encoded form of this private key according to the designated format. |
java.math.BigInteger |
getX()
Returns the private value x. |
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
gnu.java.security.key.IKeyPairCodec for DH keys, and re-constructs an instance of this
object. |
Methods inherited from class gnu.javax.crypto.key.dh.GnuDHKey |
getAlgorithm, getEncoded, 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, getEncoded, getFormat |
Field Detail |
x
private final java.math.BigInteger x
- The private exponent.
Constructor Detail |
GnuDHPrivateKey
public GnuDHPrivateKey(java.math.BigInteger q, java.math.BigInteger p, java.math.BigInteger g, java.math.BigInteger x)
- Convenience constructor. Calls the constructor with five arguments passing
Registry.RAW_ENCODING_ID>
Registry.RAW_ENCODING_ID
55 as the value of its first argument.
GnuDHPrivateKey
public GnuDHPrivateKey(int preferredFormat, java.math.BigInteger q, java.math.BigInteger p, java.math.BigInteger g, java.math.BigInteger x)
- Constructs a new instance of
GnuDHPrivateKey
given the designated parameters.
Method Detail |
valueOf
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 gnu.java.security.key.IKeyPairCodec for DH keys, and re-constructs an instance of this object.
getX
public java.math.BigInteger getX()
- Description copied from interface:
javax.crypto.interfaces.DHPrivateKey
- Returns the private value x.
- Specified by:
getX
in interfacejavax.crypto.interfaces.DHPrivateKey
getEncoded
public byte[] getEncoded(int format)
Returns the encoded form of this private key according to the designated format.
- Specified by:
getEncoded
in classGnuDHKey
equals
public boolean equals(java.lang.Object obj)
- Returns
true
if the designated object is an instance of javax.crypto.interfaces.DHPrivateKey and has the same parameter values as this one.
|
|||||||||
Home >> All >> gnu >> javax >> crypto >> key >> [ dh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |