ripemd320 0.8.0-rc1

RIPEMD-320 hash function

An implementation of the RIPEMD-320 cryptographic hash.


# #[macro_use] extern crate hex_literal;
# extern crate ripemd320;
# fn main() {
use ripemd320::{Ripemd320, Digest};

// create a RIPEMD-320 hasher instance
let mut hasher = Ripemd320::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; 40]
let expected = hex!("f1c1c231d301abcf2d7daae0269ff3e7bc68e623ad723aa068d316b056d26b7d1bb6f0cc0f28336d");
let result = hasher.result();
assert_eq!(&result[..], &expected[..]);
# }

Also see RustCrypto/hashes readme.