Skip to main content

verify_reader_sha256

Function verify_reader_sha256 

Source
pub fn verify_reader_sha256<R: Read>(
    reader: &mut R,
    expected_hex: &str,
) -> Result<(), StreamIntegrityError>
Expand description

Check a stream against an expected hex SHA-256 without holding it in memory.

The streaming twin of verify_sha256, over the same comparison: the shared ONNX Runtime layer verifies multi-hundred-megabyte model files with this before loading them.