This commit is contained in:
nora 2024-06-29 16:02:35 +02:00
parent 8627450ca8
commit 6d46c730b9
2 changed files with 24 additions and 6 deletions

13
src/bin/md5sum.rs Normal file
View file

@ -0,0 +1,13 @@
fn main() {
for file in std::env::args().skip(1) {
match std::fs::read(&file) {
Err(err) => {
eprintln!("error reading {file}: {err}")
}
Ok(content) => {
let sum = crypto_hype::hashes::md5::hash(&content);
println!("{sum} {file}");
}
};
}
}