tuweni / org.apache.tuweni.bytes / Bytes32 / leftPad

leftPad

open static fun leftPad(value: Bytes!, fill: Byte): Bytes32! (source)

Left pad a Bytes value with a fill byte to create a Bytes32.

Parameters

value - Bytes!: The bytes value pad.

fill - Byte: the byte to fill with

Exceptions

IllegalArgumentException - if value.size() > 32.

Return
Bytes32!: A Bytes32 that exposes the left-padded bytes of value.

open static fun leftPad(value: Bytes!): Bytes32! (source)

Left pad a Bytes value with zero bytes to create a Bytes32.

Parameters

value - Bytes!: The bytes value pad.

Exceptions

IllegalArgumentException - if value.size() > 32.

Return
Bytes32!: A Bytes32 that exposes the left-padded bytes of value.