gnu.crypto.pki.provider

Class GnuDSAPrivateKey

Implemented Interfaces:
DSAPrivateKey

(package private) class GnuDSAPrivateKey
extends Object
implements DSAPrivateKey

Field Summary

(package private) BigInteger
g
(package private) BigInteger
p
(package private) BigInteger
q
(package private) BigInteger
x

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

Field Details

g

(package private)  BigInteger g

p

(package private)  BigInteger p

q

(package private)  BigInteger q

x

(package private)  BigInteger x

Constructor Details

GnuDSAPrivateKey

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

Method Details

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.