Top Description Fields Constructors Methods
sun.security.provider

public final Class DSAPrivateKey

extends PKCS8Key
implements DSAPrivateKey, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.security.interfaces.DSAPrivateKey, java.security.PrivateKey, javax.security.auth.Destroyable, java.security.AsymmetricKey, java.security.Key, java.security.interfaces.DSAKey
Imports
java.io.*, java.math.BigInteger, java.security.InvalidKeyException, .AlgorithmParameters, java.security.spec.DSAParameterSpec, .InvalidParameterSpecException, java.security.interfaces.DSAParams, java.util.Arrays, sun.security.x509.AlgIdDSA, sun.security.pkcs.PKCS8Key, sun.security.util.DerValue, .DerInputStream

A PKCS#8 private key for the Digital Signature Algorithm.
Author
Benjamin Renaud
See Also
DSAPublicKey, AlgIdDSA, DSA

Field Summary

Modifier and TypeField and Description
private static final long
private final BigInteger
x

Inherited from sun.security.pkcs.PKCS8Key:
algidencodedKeykey

Constructor Summary

AccessConstructor and Description
public
DSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g)

Make a DSA private key out of a private key and three parameters.

public
DSAPrivateKey(byte[] encoded)

Make a DSA private key from its DER encoding (PKCS #8).

Method Summary

Modifier and TypeMethod and Description
public DSAParams
getParams()

Overrides default java.security.interfaces.DSAPrivateKey.getParams, java.security.AsymmetricKey.getParams.

Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.

public BigInteger
getX()

Implements java.security.interfaces.DSAPrivateKey.getX.

Get the raw private key, x, without the parameters.

Inherited from sun.security.pkcs.PKCS8Key:
clearequalsgetAlgorithmgetAlgorithmIdgetEncodedgetFormathashCodeparseKeywriteReplace

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides sun.security.pkcs.PKCS8Key.serialVersionUID, java.security.interfaces.DSAPrivateKey.serialVersionUID, java.security.PrivateKey.serialVersionUID.

use serialVersionUID from JDK 1.1. for interoperability

Annotations
@Serial
xback to summary
private final BigInteger x

Constructor Detail

DSAPrivateKeyback to summary
public DSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g)

Make a DSA private key out of a private key and three parameters.

DSAPrivateKeyback to summary
public DSAPrivateKey(byte[] encoded) throws InvalidKeyException

Make a DSA private key from its DER encoding (PKCS #8).

Method Detail

getParamsback to summary
public DSAParams getParams()

Overrides default java.security.interfaces.DSAPrivateKey.getParams, java.security.AsymmetricKey.getParams.

Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.

Returns:DSAParams

Doc from java.security.interfaces.DSAPrivateKey.getParams.

the associated parameters, may be null

getXback to summary
public BigInteger getX()

Implements java.security.interfaces.DSAPrivateKey.getX.

Get the raw private key, x, without the parameters.

Returns:BigInteger

Doc from java.security.interfaces.DSAPrivateKey.getX.

the value of the private key, x.