Class AsymmetricDSAPrivateKey

java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricDSAKey
org.bouncycastle.crypto.asymmetric.AsymmetricDSAPrivateKey
All Implemented Interfaces:
Destroyable, AsymmetricKey, AsymmetricPrivateKey, Key

public final class AsymmetricDSAPrivateKey extends AsymmetricDSAKey implements AsymmetricPrivateKey
Class for Digital Signature Algorithm (DSA) private keys.
  • Constructor Details

  • Method Details

    • getAlgorithm

      public final Algorithm getAlgorithm()
      Return the algorithm this DSA key is for.
      Specified by:
      getAlgorithm in interface Key
      Overrides:
      getAlgorithm in class AsymmetricDSAKey
      Returns:
      the key's algorithm.
    • getDomainParameters

      public final DSADomainParameters getDomainParameters()
      Return the DSA domain parameters associated with this key.
      Overrides:
      getDomainParameters in class AsymmetricDSAKey
      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 interface AsymmetricKey
      Returns:
      an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
    • getX

      public final BigInteger getX()
    • destroy

      public void destroy()
      Specified by:
      destroy in interface Destroyable
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Destroyable
    • hashCode

      public int hashCode()
      Description copied from interface: Key
      Return the hashCode for the key.
      Specified by:
      hashCode in interface Key
      Overrides:
      hashCode in class Object
      Returns:
      the key's hashCode.
    • equals

      public boolean equals(Object o)
      Description copied from interface: Key
      Return true if o is an equivalent key to this.
      Specified by:
      equals in interface Key
      Overrides:
      equals in class Object
      Parameters:
      o - object to compare to.
      Returns:
      true if o is the same or equivalent key, false otherwise.