pub fn verify_hash(input: &str, hash: &str) -> boolExpand description
Verify that a hash was computed from the given input
This is useful for validating that a hash matches an error code, which can help detect mismatches or corruption.
ยงExamples
use waddling_errors_hash::{compute_hash, verify_hash};
let code = "E.AUTH.TOKEN.001";
let hash = compute_hash(code);
assert!(verify_hash(code, &hash));
assert!(!verify_hash("E.AUTH.TOKEN.002", &hash));