MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / sha256_file

Function sha256_file

dstack-util/src/utils.rs:25–28  ·  view source on GitHub ↗
(path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

23}
24
25pub fn sha256_file(path: impl AsRef<Path>) -> Result<[u8; 32]> {
26 let data = fs::read(path).context("Failed to read file")?;
27 Ok(sha256(&data))
28}

Callers 1

measure_app_infoMethod · 0.85

Calls 1

sha256Function · 0.70

Tested by

no test coverage detected