Crate md2[][src]

Expand description

An implementation of the MD2 cryptographic hash algorithm.


use md2::{Md2, Digest};
use hex_literal::hex;

// create a Md2 hasher instance
let mut hasher = Md2::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!("d9cce882ee690a5c1ce70beff3a78c77"));

Also see RustCrypto/hashes readme.


pub use digest;


Core MD2 hasher state.


Convinience wrapper trait covering functionality of cryptographic hash functions with fixed output size.

Type Definitions

MD2 hasher state.