groestl 0.1.0

Grostl hash function

An implementation of the Groestl 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.

use groestl::{Digest, Groestl256};

let mut hasher = Groestl256::new();
hasher.input(b"my message");
let result = hasher.result();
use groestl::{Digest, GroestlSmall, GroestlBig};
use typenum::{U8, U52};

let mut hasher = GroestlSmall::<U8>::new();
hasher.input(b"my message");
let result = hasher.result();

let mut hasher = GroestlBig::<U52>::new();
hasher.input(b"my message");
let result = hasher.result();