pub trait ChecksumCalculator: Send + Sync {
// Required methods
fn calculate_file_checksum(&self, path: &Path) -> Result<String>;
fn calculate_data_checksum(&self, data: &[u8]) -> String;
fn verify_checksum(&self, path: &Path, expected: &str) -> Result<bool>;
}Expand description
校验和计算 trait