groestl 0.8.0

Grøstl hash function
Documentation

An implementation of the Grøstl cryptographic hash function.

Usage

Groestl can produce a digest of any size between 1 and 64 bytes inclusive. This crate defines the common digest sizes (Groestl224, Groestl256, Groestl384, and Groestl512), but allows you to specify a custom size with the GroestlSmall and GroestlBig structs. GroestlSmall allows you to specify a digest size between 1 and 32 inclusive, and GroestlBig allows you to specify a digest size between 33 and 64 inclusive.

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

// create a Groestl-256 hasher instance
let mut hasher = Groestl256::default();

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

// acquire hash digest in the form of GenericArray,
// which in this case is equivalent to [u8; 32]
let result = hasher.result();
assert_eq!(result[..], hex!("
    dc0283ca481efa76b7c19dd5a0b763dff0e867451bd9488a9c59f6c8b8047a86
"));
# }

Also see RustCrypto/hashes readme.