EEVM.Interpreter.Instructions.Crypto (eevm v0.1.0)

Copy Markdown View Source

EVM cryptographic opcode: KECCAK256 (0x20).

Summary

Functions

Hashes a region of memory with Keccak-256 and pushes the result.

Functions

execute(arg1, state)

Hashes a region of memory with Keccak-256 and pushes the result.

Pops offset and length from the stack, reads length bytes of memory starting at offset, and pushes the 32-byte Keccak-256 hash as a uint256. An empty input (length == 0) is valid and returns the hash of the empty string.

Gas: 30 (static) + 6 per word (dynamic) + memory expansion cost if applicable.