Interface UInt256
public interface UInt256
Utility methods for handling UInt256 (32-byte unsigned) values.
Note that SecpFieldElement values are a subset of UInt256 because
they cannot exceed P-1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigIntegerThe maximum unsigned 32-byte / 256-bit valuestatic final BigIntegerstatic final byte[] -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic BigIntegerstatic byte[]Convert a BigInteger to a 32-byte fixed-length byte array (UInt256).static boolean
-
Field Details
-
MIN_VALUE
-
MAX_VALUE
The maximum unsigned 32-byte / 256-bit value. (2^256 - 1) -
ZERO_VALUE
static final byte[] ZERO_VALUE
-
-
Method Details
-
integerTo32Bytes
Convert a BigInteger to a 32-byte fixed-length byte array (UInt256). -
isInRange
- Parameters:
e- A possible field element to validate- Returns:
- true if valid
-
checkInRange
- Parameters:
e- unvalidated integer- Returns:
- a validated integer
-