Class SecpScalarImpl

java.lang.Object
org.bitcoinj.secp.internal.SecpScalarImpl
All Implemented Interfaces:
SecpScalar

public class SecpScalarImpl extends Object implements SecpScalar
  • Constructor Details

    • SecpScalarImpl

      public SecpScalarImpl(byte[] bytes)
    • SecpScalarImpl

      public SecpScalarImpl(BigInteger i)
  • Method Details

    • toBigInteger

      public BigInteger toBigInteger()
      Description copied from interface: SecpScalar
      Get the scalar as a BigInteger
      Specified by:
      toBigInteger in interface SecpScalar
      Returns:
      scalar value
    • serialize

      public byte[] serialize()
      Specified by:
      serialize in interface SecpScalar
    • integerTo32Bytes

      public static byte[] integerTo32Bytes(BigInteger i)
      Convert a BigInteger to a fixed-length byte array verifying it's a valid P256k1 scalar.
      Parameters:
      i - an unsigned BigInteger containing a valid Secp256k1 scalar value
      Returns:
      a 32-byte, big-endian, unsigned, in-range integer value