gnu.crypto.pki.provider
Class GnuDSAPrivateKey
java.lang.Object
gnu.crypto.pki.provider.GnuDSAPrivateKey
- All Implemented Interfaces:
- Serializable, DSAKey, DSAPrivateKey, Key, PrivateKey
class GnuDSAPrivateKey
- extends Object
- implements DSAPrivateKey
x
BigInteger x
p
BigInteger p
q
BigInteger q
g
BigInteger g
GnuDSAPrivateKey
public GnuDSAPrivateKey(BigInteger x,
BigInteger p,
BigInteger q,
BigInteger g)
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interface Key
getFormat
public String getFormat()
- Specified by:
getFormat
in interface Key
getEncoded
public byte[] getEncoded()
- Encodes this key as a
PrivateKeyInfo
, as described in
PKCS #8. The ASN.1 specification for this structure is:
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL }
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
DSA private keys (in Classpath at least) have no attributes.
- Specified by:
getEncoded
in interface Key
getParams
public DSAParams getParams()
- Specified by:
getParams
in interface DSAKey
getX
public BigInteger getX()
- Specified by:
getX
in interface DSAPrivateKey
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.