Interface SecpPrivKey

All Superinterfaces:
AsymmetricKey, DEREncodablePREVIEW, Destroyable, ECKey, ECPrivateKey, Key, PrivateKey, Serializable
All Known Subinterfaces:
SecpKeyPair
All Known Implementing Classes:
SecpKeyPairImpl, SecpPrivKeyImpl

public interface SecpPrivKey extends ECPrivateKey
A P256k1 private key.
  • Method Details

    • getAlgorithm

      default String getAlgorithm()
      Specified by:
      getAlgorithm in interface Key
    • getFormat

      default String getFormat()
      Specified by:
      getFormat in interface Key
    • getEncoded

      byte[] getEncoded()
      Specified by:
      getEncoded in interface Key
      Returns:
      32-bytes, Big endian with no prefix or suffix
    • getS

      default BigInteger getS()
      Specified by:
      getS in interface ECPrivateKey
    • getParams

      default ECParameterSpec getParams()
      Specified by:
      getParams in interface AsymmetricKey
      Specified by:
      getParams in interface ECKey
      Specified by:
      getParams in interface ECPrivateKey
    • of

      static SecpPrivKey of(BigInteger p)
      Construct a private key from an integer
      Parameters:
      p - Must be a member of the Secp256k1 field
      Returns:
      private key
    • of

      static SecpPrivKey of(byte[] bytes)
      Construct a private key from bytes
      Parameters:
      bytes - bytes
      Returns:
      private key
    • destroy

      void destroy()
      Destroy must be implemented and must not throw (checked) exceptions
      Specified by:
      destroy in interface Destroyable