TRY ONLINE

Input
Hash

EXAMPLES

Hashes whatever you give it with keccak256:
cast keccak "I tried auditioning at the foundry, but they said: Sorry, we only cast iron."
0x83ee1d1103f1f612ae164e30f597409cbebed0c5168f31b12cce1a0fc0f90bf3
Useful for getting the function selector of a function signature. Just pass the function signature as a string and get the first 4 bytes of the hash:
cast keccak "transfer(address,uint256)"
0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b
Works with hex values too:
cast keccak 0x1234
0x56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432

DOCUMENTATION

cast keccak


NAME

cast-keccak - Hash arbitrary data using keccak-256.

SYNOPSIS

cast keccak [options] data

DESCRIPTION

Hash arbitrary data using keccak-256.

OPTIONS

Common Options

-h
--help
    Prints help information.

SEE ALSO

cast