eth / org.apache.tuweni.eth / Hash / fromBytes

fromBytes

static fun fromBytes(bytes: Bytes): Hash (source)

Create a Hash from Bytes.

The hash must be exactly 32 bytes.

Parameters

bytes - The bytes for this hash.

Exceptions

IllegalArgumentException - If bytes.size() != 32.

Return
A hash.

static fun fromBytes(bytes: Bytes32): Hash (source)

Create a Hash from Bytes32.

Parameters

bytes - The bytes for this hash.

Return
A hash.