Skip to main content

ct_is_zero

Function ct_is_zero 

Source
pub fn ct_is_zero(data: &[u8]) -> bool
Expand description

Constant-time check whether every byte in data is zero.

Returns true only if all bytes are 0x00. The runtime is proportional to data.len(), regardless of the actual content.