Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.javax.crypto.key.dh.GnuDHKey
p
, and g
.
According to the JDK, cryptographic Keys all have a format.
The format used in this implementation is called Raw, and basically
consists of the raw byte sequences of algorithm parameters. The exact order
of the byte sequences and the implementation details are given in each of the
relevant getEncoded()
methods of each of the private and
public keys.
Reference:
Field Summary | |
protected int |
|
protected BigInteger |
|
protected BigInteger |
|
protected BigInteger |
|
Fields inherited from interface java.security.Key | |
serialVersionUID |
Constructor Summary | |
|
Method Summary | |
boolean | |
String | |
byte[] |
|
abstract byte[] |
|
String | |
DHParameterSpec | |
BigInteger |
|
String |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected final int defaultFormat
Identifier of the default encoding format to use when externalizing the key material.
protected GnuDHKey(int defaultFormat, BigInteger q, BigInteger p, BigInteger g)
Trivial protected constructor.
- Parameters:
defaultFormat
- the identifier of the encoding format to use by default when externalizing the key.q
- a prime divisor of p-1.p
- the public prime.g
- the generator of the group.
public boolean equals(Object obj)
Returnstrue
if the designated object is an instance ofDHKey
and has the same Diffie-Hellman parameter values as this one.
- Parameters:
obj
- the other non-null DH key to compare to.
- Returns:
true
if the designated object is of the same type and value as this one.
public byte[] getEncoded()
Deprecated. see getEncoded(int).
- Specified by:
- getEncoded in interface Key
public String toString()
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it intoSystem.out.println()
and such.It is typical, but not required, to ensure that this method never completes abruptly with a
RuntimeException
.This method will be called when performing string concatenation with this object. If the result is
null
, string concatenation will instead use"null"
.The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode())
.
- Returns:
- the String representing this Object, which may be null
- See Also:
getClass()
,Object.hashCode()
,Class.getName()
,Integer.toHexString(int)