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 - the SSZ encoded bytes

hashLength - 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
the bytes of the hash