MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / verify_or_cache

Method verify_or_cache

crates/openshell-supervisor-network/src/identity.rs:102–104  ·  view source on GitHub ↗
(&self, path: &Path)

Source from the content-addressed store, hash-verified

100 /// Returns `Ok(hash)` if it matches, `Err` if the hash changed (binary tampered).
101 #[cfg_attr(not(target_os = "linux"), allow(dead_code))]
102 pub fn verify_or_cache(&self, path: &Path) -> Result<String> {
103 self.verify_or_cache_with_hasher(path, procfs::file_sha256)
104 }
105
106 fn verify_or_cache_with_hasher<F>(&self, path: &Path, mut hash_file: F) -> Result<String>
107 where

Calls 1