Skip to main content

verify

Function verify 

Source
pub fn verify(code: &str, hash: &str) -> bool
Expand description

Verifies code against a SHA-256 hex hash produced by generate.

Normalizes code before hashing (strips hyphens, lowercases) so that users can submit codes with or without the separator. Comparison is constant-time to prevent timing attacks.

Requires feature "auth".