gnu.crypto.pki.provider

Class GnuDSAPrivateKey

class GnuDSAPrivateKey extends Object implements DSAPrivateKey

Field Summary
BigIntegerg
BigIntegerp
BigIntegerq
BigIntegerx
Constructor Summary
GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g)
Method Summary
StringgetAlgorithm()
byte[]getEncoded()
Encodes this key as a PrivateKeyInfo, as described in PKCS #8.
StringgetFormat()
DSAParamsgetParams()
BigIntegergetX()
StringtoString()

Field Detail

g

BigInteger g

p

BigInteger p

q

BigInteger q

x

BigInteger x

Constructor Detail

GnuDSAPrivateKey

public GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g)

Method Detail

getAlgorithm

public String getAlgorithm()

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.

getFormat

public String getFormat()

getParams

public DSAParams getParams()

getX

public BigInteger getX()

toString

public String toString()
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.