
## miden::core::crypto::hashes::keccak256
| Procedure | Description |
| ----------- | ------------- |
| hash_bytes | Computes Keccak256 hash of data stored in memory.<br /><br />Input: [ptr, len_bytes, ...]<br />Output: [DIGEST_U32[8], ...]<br /><br />Where:<br />- ptr: word-aligned memory address containing INPUT_U32[len_u32] where len_u32=⌈len_bytes/4⌉<br />- len_bytes: number of bytes to hash<br />- INPUT_U32[len_u32] ~ INPUT_U8[len_bytes] with u32 packing (unused bytes in final u32 must be 0)<br />- DIGEST_U32[8] = [d_0, ..., d_7] = Keccak256(INPUT_U8[len_bytes])<br /> |
| hash | Computes Keccak256 hash of a single 256-bit input.<br /><br />Input: [INPUT_U32[8], ...]<br />Output: [DIGEST_U32[8], ...]<br /><br />Where<br />- DIGEST_U32[8] = [d_0, ..., d_7] = Keccak256(INPUT_U8[32])<br />- INPUT_U32[8] = [i_0, ..., i_7] = [INPUT_LO, INPUT_HI] ~ INPUT_U8[32] with u32 packing<br /> |
| merge | Merges two 256-bit digests via Keccak256 hash.<br /><br />Input: [INPUT_L_U32[8], INPUT_R_U32[8], ...]<br />Output: [DIGEST_U32[8], ...]<br /><br />Where<br />- INPUT_L_U32[8] = [l_0, ..., l_7] = [INPUT_L_LO, INPUT_L_HI] ~ INPUT_L_U8[32]<br />- INPUT_R_U32[8] = [r_0, ..., r_7] = [INPUT_R_LO, INPUT_R_HI] ~ INPUT_R_U8[32]<br />- DIGEST_U32[8] = [d_0, ..., d_7] = Keccak256(INPUT_L_U8[32] \|\| INPUT_R_U8[32])<br /> |
