NAME

Web3::Tiny::Keccak256 - Keccak-256 (Ethereum flavor)

SYNOPSIS

use Web3::Tiny::Keccak256 qw(keccak256 keccak256_hex);

my $digest = keccak256("hello");        # 32 raw bytes
my $hex    = keccak256_hex("hello");    # 64 hex chars

DESCRIPTION

Thin wrapper around Crypt::Digest::Keccak256 (part of CryptX, an XS module wrapping libtomcrypt) using the original Keccak padding/domain separation (0x01), which is what Ethereum uses for function selectors, address derivation, and hashing in general -- not NIST SHA3-256 (which uses a 0x06 domain separator and would give different digests).