Skip to main content

hash_file

Function hash_file 

Source
pub fn hash_file(path: &Path) -> Result<Hash32>
Expand description

SHA-256 of a file’s contents, streamed in fixed blocks.

Opens path and feeds it through [hash_reader] rather than reading the whole file into memory, so arbitrarily large originals hash with bounded memory. The digest itself is capsule-core’s; only the file handle is the library’s.