The MD5 hash function for Rust
open sourceApache-2.0 OR MITfree
md5 is a small Rust crate that computes MD5 digests, with md5::compute returning a digest you can format as hex. Its README says it exists for interoperability with protocols and systems that mandate MD5, which is cryptographically broken and shouldn't be used for new designs.
Problems it solves
- compute an MD5 checksum in Rust to match a legacy protocol or file format
- check a file against a published MD5 sum from a Rust program
- verify an MD5 hash some other system sends me in a Rust service
Features
- md5::compute for one-shot digests, formatted with {:x}
- std feature on by default
Limitations
- MD5 is cryptographically broken: the README says to use it only for interoperability with protocols and systems that require it1
Alternatives
The same job
These do what md5 (Rust crate) does.
- RustCrypto Hashes Collection of cryptographic hash functions written in pure Rust
