|
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.dss.DSSKey gnu.crypto.key.dss.DSSPrivateKey
An object that embodies a DSS (Digital Signature Standard) private key.
getEncoded(int)
,
Serialized FormField Summary |
Fields inherited from class gnu.crypto.key.dss.DSSKey |
g, p, q |
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Fields inherited from interface java.security.interfaces.DSAPrivateKey |
serialVersionUID |
Constructor Summary | |
DSSPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger x)
Trivial constructor. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if the designated object is an instance of
DSAPrivateKey and has the same DSS (Digital Signature Standard)
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()
|
static DSSPrivateKey |
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.key.dss.DSSKey |
getAlgorithm, getEncoded, getFormat, getParams |
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.DSAKey |
getParams |
Constructor Detail |
public DSSPrivateKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger x)
Trivial constructor.
p
- the public modulus.q
- the public prime divisor of p-1
.g
- a generator of the unique cyclic group Z*
p
.x
- the private key part.Method Detail |
public static DSSPrivateKey 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.
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 java.math.BigInteger getX()
getX
in interface java.security.interfaces.DSAPrivateKey
public byte[] getEncoded(int format)
Returns the encoded form of this private key according to the designated format.
getEncoded
in class DSSKey
format
- the desired format identifier of the resulting encoding.
java.lang.IllegalArgumentException
- if the format is not supported.DSSKeyPairRawCodec
public boolean equals(java.lang.Object obj)
Returns true
if the designated object is an instance of
DSAPrivateKey
and has the same DSS (Digital Signature Standard)
parameter values as this one.
equals
in class DSSKey
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |