u64beInt static method

Uint8List u64beInt(
  1. int value
)

Encodes an unsigned 64-bit integer as big-endian 8 bytes.

HINT: Use for the window field in derivations.

Implementation

static Uint8List u64beInt(int value) {
  if (value < 0) {
    throw ArgumentError.value(value, 'value', 'Must be non-negative.');
  }
  // Dart ints are arbitrary precision; constrain to 0..2^64-1 logically.
  final big = BigInt.from(value);
  return u64be(big);
}