Skip to main content

verify

Function verify 

Source
pub fn verify(bytes: &[u8], recorded: &str) -> bool
Expand description

Whether bytes still hash to the recorded digest. true when the recorded value is empty — nothing was ever recorded, so there is nothing to contradict (a document predating fixity is not “corrupt”). A recorded value prov cannot recognize (a future algorithm) is treated as unverifiable, which is also true: fixity never raises a false alarm over a hash it does not understand, it simply cannot vouch for it.