in aws-lc-rs-testing/benches/pbkdf2_benchmark.rs [94:116]
fn bench_pbkdf2(c: &mut Criterion, config: &PBKDF2Config) {
for &iterations in &G_ITERATIONS {
let iter = NonZeroU32::new(iterations).unwrap();
let bench_group_name = format!("PBKDF2-{:?}-{}-iterations", config.algorithm, iter);
let mut group = c.benchmark_group(bench_group_name);
let mut aws_out = vec![0u8; 64];
group.bench_function("AWS-LC", |b| {
b.iter(|| {
aws_lc_rs_benchmarks::run_pbkdf2_derive(config, iter, &mut aws_out);
});
});
#[cfg(feature = "ring-benchmarks")]
{
let mut ring_out = vec![0u8; 64];
group.bench_function("Ring", |b| {
b.iter(|| {
ring_benchmarks::run_pbkdf2_derive(config, iter, &mut ring_out);
});
});
}
}
}