Class AsymmetricDSAPrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
org.bouncycastle.crypto.asymmetric.AsymmetricDSAPrivateKey
- All Implemented Interfaces:
Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
Class for Digital Signature Algorithm (DSA) private keys.
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricDSAPrivateKey
(Algorithm algorithm, byte[] enc) AsymmetricDSAPrivateKey
(Algorithm algorithm, PrivateKeyInfo privateKeyInfo) AsymmetricDSAPrivateKey
(Algorithm algorithm, DSADomainParameters params, BigInteger x) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
boolean
Return true if o is an equivalent key to this.final Algorithm
Return the algorithm this DSA key is for.final DSADomainParameters
Return the DSA domain parameters associated with this key.final byte[]
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.final BigInteger
getX()
int
hashCode()
Return the hashCode for the key.boolean
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
checkApprovedOnlyModeStatus, isThreadCorrectMode, zeroize
-
Constructor Details
-
AsymmetricDSAPrivateKey
-
AsymmetricDSAPrivateKey
-
AsymmetricDSAPrivateKey
-
-
Method Details
-
getAlgorithm
Return the algorithm this DSA key is for.- Specified by:
getAlgorithm
in interfaceKey
- Overrides:
getAlgorithm
in classAsymmetricDSAKey
- Returns:
- the key's algorithm.
-
getDomainParameters
Return the DSA domain parameters associated with this key.- Overrides:
getDomainParameters
in classAsymmetricDSAKey
- Returns:
- the DSA domain parameters for this key.
-
getEncoded
public final byte[] getEncoded()Description copied from interface:AsymmetricKey
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncoded
in interfaceAsymmetricKey
- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getX
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
-
hashCode
public int hashCode()Description copied from interface:Key
Return the hashCode for the key. -
equals
Description copied from interface:Key
Return true if o is an equivalent key to this.
-