#![allow(dead_code)] use std::path::Path; use sha1::{Digest, Sha1}; use crate::errors::McError; pub async fn sha1_hex(path: &Path) -> Result { let data = tokio::fs::read(path).await?; let mut hasher = Sha1::new(); hasher.update(&data); Ok(format!("{:x}", hasher.finalize())) }