This commit is contained in:
nora 2024-06-29 16:57:37 +02:00
parent 6d46c730b9
commit 5ff6bc24fa
6 changed files with 181 additions and 1 deletions

13
src/bin/sha1sum.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::sha1::hash(&content);
println!("{sum} {file}");
}
};
}
}