tuweni / org.apache.tuweni.rlp / RLP / decodeBigInteger

decodeBigInteger

static fun decodeBigInteger(source: Bytes): BigInteger (source)

Read an RLP encoded big integer from a Bytes value.

Parameters

source - The RLP encoded bytes.

Exceptions

InvalidRLPEncodingException - If there is an error decoding the RLP source.

Return
A BigInteger.

static fun decodeBigInteger(source: Bytes, lenient: Boolean): BigInteger (source)

Read an RLP encoded big integer from a Bytes value.

Parameters

source - The RLP encoded bytes.

lenient - If false, an exception will be thrown if the value is not minimally encoded.

Exceptions

InvalidRLPEncodingException - If there is an error decoding the RLP source.

Return
A BigInteger.