tuweni / org.apache.tuweni.ssz / SSZ / encodeUInt

encodeUInt

static fun encodeUInt(value: Int, bitLength: Int): Bytes! (source)

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

Parameters

value - Int: the integer to encode

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

Exceptions

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

Return
Bytes!: the SSZ encoding in a Bytes value