Class AsymmetricDSAPrivateKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
-
- org.bouncycastle.crypto.asymmetric.AsymmetricDSAPrivateKey
-
- All Implemented Interfaces:
javax.security.auth.Destroyable,AsymmetricKey,AsymmetricPrivateKey,Key
public final class AsymmetricDSAPrivateKey extends AsymmetricDSAKey implements AsymmetricPrivateKey, javax.security.auth.Destroyable
Class for Digital Signature Algorithm (DSA) private keys.
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
algorithm, approvedModeOnly, domainParameters
-
-
Constructor Summary
Constructors Constructor Description AsymmetricDSAPrivateKey(Algorithm algorithm, byte[] enc)AsymmetricDSAPrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)AsymmetricDSAPrivateKey(Algorithm algorithm, DSADomainParameters params, java.math.BigInteger x)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()booleanequals(java.lang.Object o)Return true if o is an equivalent key to this.AlgorithmgetAlgorithm()Return the algorithm this DSA key is for.DSADomainParametersgetDomainParameters()Return the DSA domain parameters associated with this key.byte[]getEncoded()Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.java.math.BigIntegergetX()inthashCode()Return the hashCode for the key.booleanisDestroyed()-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
checkApprovedOnlyModeStatus, zeroize
-
-
-
-
Constructor Detail
-
AsymmetricDSAPrivateKey
public AsymmetricDSAPrivateKey(Algorithm algorithm, DSADomainParameters params, java.math.BigInteger x)
-
AsymmetricDSAPrivateKey
public AsymmetricDSAPrivateKey(Algorithm algorithm, byte[] enc)
-
AsymmetricDSAPrivateKey
public AsymmetricDSAPrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)
-
-
Method Detail
-
getAlgorithm
public final Algorithm getAlgorithm()
Return the algorithm this DSA key is for.- Specified by:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin classAsymmetricDSAKey- Returns:
- the key's algorithm.
-
getDomainParameters
public final DSADomainParameters 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
public final java.math.BigInteger getX()
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable
-
hashCode
public int hashCode()
Description copied from interface:KeyReturn the hashCode for the key.
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:KeyReturn true if o is an equivalent key to this.
-
-