mirror of
https://github.com/Noratrieb/crypto-hype.git
synced 2026-01-14 17:25:00 +01:00
13 lines
363 B
Rust
13 lines
363 B
Rust
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}");
|
|
}
|
|
};
|
|
}
|
|
}
|