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 TypeMethodDescriptionvoiddestroy()booleanReturn true if o is an equivalent key to this.final AlgorithmReturn the algorithm this DSA key is for.final DSADomainParametersReturn 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 BigIntegergetX()inthashCode()Return the hashCode for the key.booleanMethods 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:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin classAsymmetricDSAKey- Returns:
- the key's algorithm.
-
getDomainParameters
Return the DSA domain parameters associated with this key.- Overrides:
getDomainParametersin classAsymmetricDSAKey- Returns:
- the DSA domain parameters for this key.
-
getEncoded
public final byte[] getEncoded()Description copied from interface:AsymmetricKeyReturn an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncodedin interfaceAsymmetricKey- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getX
-
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
hashCode
public int hashCode()Description copied from interface:KeyReturn the hashCode for the key. -
equals
Description copied from interface:KeyReturn true if o is an equivalent key to this.
-