Skip to main content

ct_hash_eq

Function ct_hash_eq 

Source
pub fn ct_hash_eq(a: &str, b: &str) -> bool
Expand description

Constant-time hash comparison. Both inputs must be hex-encoded SHA-256 (64 hex chars). Returns false on any length mismatch without leaking the position via short-circuit.