(&self, path: &Path)
| 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 |