Blake3 hex digest of a file's contents.
(path: &Path)
| 169 | |
| 170 | /// Blake3 hex digest of a file's contents. |
| 171 | pub fn hash_file(path: &Path) -> AgentResult<String> { |
| 172 | let bytes = std::fs::read(path)?; |
| 173 | Ok(blake3::hash(&bytes).to_hex().to_string()) |
| 174 | } |
| 175 | |
| 176 | #[cfg(test)] |
| 177 | mod tests { |
no test coverage detected