#md5 #digest #hash #checksum

chksum-md5

An implementation of the MD5 hash function with a straightforward interface for computing digests of bytes, files, directories, and more

1 unstable release

0.0.0 Dec 21, 2023

#39 in #md5

Download history 141/week @ 2024-01-04 556/week @ 2024-01-11 507/week @ 2024-01-18 349/week @ 2024-01-25 761/week @ 2024-02-01 2315/week @ 2024-02-08 1854/week @ 2024-02-15 2613/week @ 2024-02-22 2220/week @ 2024-02-29 2371/week @ 2024-03-07 2510/week @ 2024-03-14 2573/week @ 2024-03-21 489/week @ 2024-03-28 679/week @ 2024-04-04 775/week @ 2024-04-11 492/week @ 2024-04-18

3,037 downloads per month
Used in 3 crates (2 directly)

MIT license

19KB
169 lines

chksum-md5

GitHub Build docs.rs MSRV deps.rs unsafe forbidden LICENSE

An implementation of the MD5 hash function with a straightforward interface for computing digests of bytes, files, directories, and more.

Setup

To use this crate, add the following entry to your Cargo.toml file in the dependencies section:

[dependencies]
chksum-md5 = "0.0.0"

Alternatively, you can use the cargo add subcommand:

cargo add chksum-md5

Usage

Use the chksum function to calcualate digest of file, directory and so on.

use chksum_md5 as md5;

let file = File::open(path)?;
let digest = md5::chksum(file)?;
assert_eq!(
    digest.to_hex_lowercase(),
    "5c71dbb287630d65ca93764c34d9aa0d"
);

For more usage examples, refer to the documentation available at docs.rs.

License

This crate is licensed under the MIT License.

Dependencies

~0.4–0.9MB
~20K SLoC