Class SecpScalarImpl
java.lang.Object
org.bitcoinj.secp.internal.SecpScalarImpl
- All Implemented Interfaces:
SecpScalar
-
Field Summary
Fields inherited from interface SecpScalar
MAX_VALUE, MIN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Convert a BigInteger to a fixed-length byte array verifying it's a valid P256k1 scalar.byte[]Get the scalar as aBigInteger
-
Constructor Details
-
SecpScalarImpl
public SecpScalarImpl(byte[] bytes) -
SecpScalarImpl
-
-
Method Details
-
toBigInteger
Description copied from interface:SecpScalarGet the scalar as aBigInteger- Specified by:
toBigIntegerin interfaceSecpScalar- Returns:
- scalar value
-
serialize
public byte[] serialize()- Specified by:
serializein interfaceSecpScalar
-
integerTo32Bytes
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
-