Skip to main content

verify_source_sha256

Function verify_source_sha256 

Source
pub fn verify_source_sha256<S: Q42RangeSource>(
    source: &S,
    expected: &[u8; 32],
    scratch: &mut [u8],
) -> Result<()>
Expand description

Stream the complete immutable source through a caller-provided scratch buffer and compare it to the SHA-256 committed by the root descriptor. This is the bounded verification path for a trusted HTTP/IPFS gateway; partial-CAR block proofs can later authenticate individual ranges sooner.