public final class DSAPrivateKey
extends com.ibm.security.pkcs8.PrivateKeyInfo
implements java.security.interfaces.DSAPrivateKey, java.io.Serializable
Constructor and Description |
---|
DSAPrivateKey(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
Create a DSA private key from x, p, q, and g.
|
DSAPrivateKey(byte[] encoded)
Create a DSA private key from it's DER encoding (PKCS#8)
|
Modifier and Type | Method and Description |
---|---|
java.security.interfaces.DSAParams |
getParams()
Returns the DSA parameters associated with this key, or null if the
parameters could not be parsed.
|
java.math.BigInteger |
getX()
Return the value of the private key.
|
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
void |
zeroize()
This function zeroizes the key so that it isn't in memory
|
addAttribute, addAttributes, clone, encode, equals, getAlgorithm, getAlgorithmId, getAttribute, getAttributes, getEncoded, getFormat, getKeyBytes, hasAttribute, hasAttributes, hashCode, parseKey, parseKey
public DSAPrivateKey(java.math.BigInteger x, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g) throws java.security.InvalidKeyException
x
- the private keyp
- the number pq
- the number qg
- the number gjava.security.InvalidKeyException
public DSAPrivateKey(byte[] encoded) throws java.security.InvalidKeyException
encoded
- the encoded parameters.java.security.InvalidKeyException
public java.security.interfaces.DSAParams getParams()
getParams
in interface java.security.interfaces.DSAKey
public java.math.BigInteger getX()
getX
in interface java.security.interfaces.DSAPrivateKey
public java.lang.String toString()
toString
in class com.ibm.security.pkcs8.PrivateKeyInfo
public void zeroize()
© Portions Copyright 2003, 2012 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2012, Oracle and/or its affiliates. All rights reserved.