tuweni / org.apache.tuweni.ssz / SSZ / encodeULong

encodeULong

static fun encodeULong(value: Long, bitLength: Int): Bytes (source)

Encode an unsigned long integer to a Bytes value. Note that value is a native signed long, but will be interpreted as an unsigned value.

Parameters

value - the long to encode

bitLength - the bit length of the integer value (must be a multiple of 8)

Exceptions

IllegalArgumentException - if the value is too large for the specified bitLength

Return
the SSZ encoding in a Bytes value