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