Function blake2b_simd::many::update_many
source · pub fn update_many<'a, 'b, I, T>(pairs: I)
Expand description
Update any number of State
objects at once.
§Example
use blake2b_simd::{blake2b, State, many::update_many};
let mut states = [
State::new(),
State::new(),
State::new(),
State::new(),
];
let inputs = [
&b"foo"[..],
&b"bar"[..],
&b"baz"[..],
&b"bing"[..],
];
update_many(states.iter_mut().zip(inputs.iter()));
for (state, input) in states.iter_mut().zip(inputs.iter()) {
assert_eq!(blake2b(input), state.finalize());
}