An implementation of the MD2 cryptographic hash algorithm.
Usage
# extern crate hex_literal;
# extern crate md2;
#
Also see RustCrypto/hashes readme.
An implementation of the MD2 cryptographic hash algorithm.
# #[macro_use] extern crate hex_literal;
# extern crate md2;
# fn main() {
use md2::{Md2, Digest};
// create a Md2 hasher instance
let mut hasher = Md2::new();
// process input message
hasher.input(b"hello world");
// acquire hash digest in the form of GenericArray,
// which in this case is equivalent to [u8; 16]
let result = hasher.result();
assert_eq!(result[..], hex!("d9cce882ee690a5c1ce70beff3a78c77"));
# }
Also see RustCrypto/hashes readme.