1 stable release
Uses new Rust 2024
| 1.0.0 | Jul 15, 2025 |
|---|
#476 in Compression
684 downloads per month
Used in asic-rs
7KB
82 lines
Pure Rust implementation of the md5crypt password hashing function.
Security warning!
md5crypt is considered cryptographically broken and unsafe for use as a password scrambler. This crate is provided for interoperability with legacy systems only.
See the following links for more information:
- https://web.archive.org/web/20180317164935/http://phk.freebsd.dk/sagas/md5crypt_eol.html
- https://datatracker.ietf.org/doc/html/rfc6151
- https://dl.acm.org/doi/10.1109/CIS.2009.214
- https://www.kb.cert.org/vuls/id/836068
Usage
use md5crypt::md5crypt;
let password = b"hunter2";
let salt = b"1234abcd";
assert_eq!(md5crypt(password, salt), b"$1$1234abcd$k941IFPqhCBpKvhOnZqRd/");
Dependencies
~19KB