For the latest news and information visit
The GNU Crypto project

gnu.crypto.pki.provider
Class GnuDSAPrivateKey

java.lang.Object
  extended bygnu.crypto.pki.provider.GnuDSAPrivateKey
All Implemented Interfaces:
DSAKey, DSAPrivateKey, Key, PrivateKey, Serializable

class GnuDSAPrivateKey
extends Object
implements DSAPrivateKey


Field Summary
(package private)  BigInteger g
           
(package private)  BigInteger p
           
(package private)  BigInteger q
           
(package private)  BigInteger x
           
 
Fields inherited from interface java.security.interfaces.DSAPrivateKey
serialVersionUID
 
Constructor Summary
GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g)
           
 
Method Summary
 String getAlgorithm()
           
 byte[] getEncoded()
          Encodes this key as a PrivateKeyInfo, as described in PKCS #8.
 String getFormat()
           
 DSAParams getParams()
           
 BigInteger getX()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

BigInteger x

p

BigInteger p

q

BigInteger q

g

BigInteger g
Constructor Detail

GnuDSAPrivateKey

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

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()

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.