Skip to main content

verify_data_hash

Function verify_data_hash 

Source
pub fn verify_data_hash(
    html: &[u8],
    data_hash: &DataHash,
    hasher: &impl Hasher,
) -> Result<(), Error>
Expand description

Verify a c2pa.hash.data binding against html, following the validator procedure: apply the assertion’s own exclusion ranges, recompute, compare.

The ranges must match the located manifest element. An assertion that excludes some other span would otherwise hash a document the manifest does not describe.