Module blake2b_simd::blake2bp[][src]

Expand description

BLAKE2bp, a variant of BLAKE2b that uses SIMD more efficiently.

The AVX2 implementation of BLAKE2bp is about twice as fast that of BLAKE2b. However, note that it’s a different hash function, and it gives a different hash from BLAKE2b for the same input.

Example

use blake2b_simd::blake2bp;

let hash = blake2bp::Params::new()
    .hash_length(16)
    .key(b"The Magic Words are Squeamish Ossifrage")
    .to_state()
    .update(b"foo")
    .update(b"bar")
    .update(b"baz")
    .finalize();
assert_eq!("e69c7d2c42a5ac14948772231c68c552", &hash.to_hex());

Structs

Params

A parameter builder for BLAKE2bp, just like the Params type for BLAKE2b.

State

An incremental hasher for BLAKE2bp, just like the State type for BLAKE2b.

Functions

blake2bp

Compute the BLAKE2bp hash of a slice of bytes all at once, using default parameters.