Class AsymmetricECGOST3410PrivateKey

java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key<ECDomainParameters>
org.bouncycastle.crypto.asymmetric.AsymmetricECGOST3410PrivateKey
All Implemented Interfaces:
Destroyable, AsymmetricKey, AsymmetricPrivateKey, Key

public final class AsymmetricECGOST3410PrivateKey extends AsymmetricGOST3410Key<ECDomainParameters> implements AsymmetricPrivateKey
Class for keys for GOST R 34.10-2001 (ECGOST) private keys.
  • Constructor Details

  • Method Details

    • 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.
    • getAlgorithm

      public final Algorithm getAlgorithm()
      Return the algorithm this GOST R 34.10 key is for.
      Specified by:
      getAlgorithm in interface Key
      Overrides:
      getAlgorithm in class AsymmetricGOST3410Key<ECDomainParameters>
      Returns:
      the key's algorithm.
    • getParameters

      public final GOST3410Parameters<ECDomainParameters> getParameters()
      Return the domain parameters associated with this key.These will either be for GOST R 34.10-1994 or GOST R 34.10-2001 depending on the key type.
      Overrides:
      getParameters in class AsymmetricGOST3410Key<ECDomainParameters>
      Returns:
      the GOST3410 domain parameters.
    • getS

      public BigInteger getS()
    • 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.