[][src]Crate ripemd160

An implementation of the RIPEMD-160 cryptographic hash.

Usage

use hex_literal::hex;
use ripemd160::{Ripemd160, Digest};

// create a RIPEMD-160 hasher instance
let mut hasher = Ripemd160::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; 20]
let result = hasher.finalize();
assert_eq!(result[..], hex!("7f772647d88750add82d8e1a7a3e5c0902a346a3"));

Also see RustCrypto/hashes readme.

Re-exports

pub use digest;

Structs

Ripemd160

Structure representing the state of a Ripemd160 computation

Traits

Digest

The Digest trait specifies an interface common for digest functions.