Skip to main content

Module constant_folding

Module constant_folding 

Source
Expand description

Constant folding: Pre-compute common hash results

Caches common hash pre-images for constant folding.

Constants§

EMPTY_STRING_DOUBLE_HASH
Pre-computed: Double SHA256 of empty string
EMPTY_STRING_HASH
Pre-computed: SHA256 of empty string

Functions§

is_empty_double_hash
Check if input matches empty string double hash (constant folding)
is_empty_hash
Check if input matches empty string hash (constant folding)
is_zero_hash
Constant-fold: Check if hash is zero (all zeros)