Module blake2s_simd::blake2sp
source · Expand description
BLAKE2sp, a variant of BLAKE2s that uses SIMD more efficiently.
The AVX2 implementation of BLAKE2sp is about twice as fast that of BLAKE2s. However, note that it’s a different hash function, and it gives a different hash from BLAKE2s for the same input.
Example
use blake2s_simd::blake2sp;
let hash = blake2sp::Params::new()
.hash_length(16)
.key(b"Squeamish Ossifrage")
.to_state()
.update(b"foo")
.update(b"bar")
.update(b"baz")
.finalize();
assert_eq!("9a604f1653c25063debb3aeea79671c0", &hash.to_hex());
Structs
- A parameter builder for BLAKE2sp, just like the
Params
type for BLAKE2s. - An incremental hasher for BLAKE2sp, just like the
State
type for BLAKE2s.
Functions
- Compute the BLAKE2sp hash of a slice of bytes all at once, using default parameters.