tuweni / org.apache.tuweni.ssz / SSZ / decodeHash

decodeHash

static fun decodeHash(source: Bytes!, hashLength: Int): Bytes! (source)

Read a 32-byte hash from the SSZ source.

Parameters

source - Bytes!: the SSZ encoded bytes

hashLength - Int: the length of the hash (in bytes)

Exceptions

InvalidSSZTypeException - if there are insufficient encoded bytes for a 32-byte hash

EndOfSSZException - if there are no more SSZ values to read

Return
Bytes!: the bytes of the hash