#digest #hash #crypto

no-std ripemd128

RIPEMD-128 hash function

3 releases

0.1.2 Feb 19, 2019
0.1.1 Feb 19, 2019
0.1.0 Feb 19, 2019

#77 in #digest

Download history 17/week @ 2024-02-19 42/week @ 2024-02-26 23/week @ 2024-03-04 15/week @ 2024-03-11 15/week @ 2024-03-18 14/week @ 2024-03-25 67/week @ 2024-04-01 13/week @ 2024-04-08 35/week @ 2024-04-15 27/week @ 2024-04-22

144 downloads per month

MIT/Apache

20KB
271 lines

Ripemd128

A pure rust implementation of the RIPEMD-128 cryptographic hash based on RustCrypto/hashes ripemd160.

Usage

use ripemd128::{Ripemd128, Digest};

// create a RIPEMD-128 hasher instance
let mut hasher = Ripemd128::new();

// process input message
hasher.input(b"abc");

// 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!("c14a12199c66e4ba84636b0f69144c77"));

Also see RustCrypto/hashes readme.


lib.rs:

An implementation of the RIPEMD-128 cryptographic hash.

Usage

use ripemd128::{Ripemd128, Digest};

// create a RIPEMD-128 hasher instance
let mut hasher = Ripemd128::new();

// process input message
hasher.input(b"abc");

// 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!("c14a12199c66e4ba84636b0f69144c77"));

Also see RustCrypto/hashes readme.

Dependencies

~495KB
~11K SLoC