use md5::{Digest, Md5}; use std::{ fs::File, io::{BufWriter, Write}, }; fn main() -> std::io::Result<()> { let file = File::create("./hashes.txt")?; let mut writer = BufWriter::new(file); for i in 0u32..=std::u32::MAX { let mut hasher = Md5::new(); // let mut out = [0; 16]; hasher.update(i.to_le_bytes()); let out = hasher.finalize(); writeln!(writer, "{:02x}", out[out.len() - 1])?; if i % 100_000 == 0 { println!("{i}"); } } Ok(()) }