lib.rs |
An implementation of the [MD5][1] cryptographic hash algorithm.
# Usage
```rust
use md5::{Md5, Digest};
use hex_literal::hex;
// create a Md5 hasher instance
let mut hasher = Md5::new();
// process input message
hasher.update(b"hello world");
// acquire hash digest in the form of GenericArray,
// which in this case is equivalent to [u8; 16]
let result = hasher.finalize();
assert_eq!(result[..], hex!("5eb63bbbe01eeed093cb22bb8f5acdc3"));
```
Also see [RustCrypto/hashes][2] readme.
[1]: https://en.wikipedia.org/wiki/MD5
[2]: https://github.com/RustCrypto/hashes |
3917 |