Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hashes

Library of standard hash functions. Available since v5.1.

Functions

commutativeKeccak256

Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs. NOTE: Equivalent to the standardNodeHash in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].

function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32);

efficientKeccak256

Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.

function efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32 value);