Skip to content

Commit 6dd52f8

Browse files
committed
Fix dndk-gcm decrypt benchmark input
1 parent f5b2973 commit 6dd52f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

benches/src/dndk-gcm.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ fn bench(c: &mut Benchmarker) {
2424
});
2525
group.bench_function(BenchmarkId::new("decrypt-256", size), |b| {
2626
let cipher = DndkGcm::new(&Default::default());
27-
b.iter(|| cipher.decrypt(&Default::default(), &*buf))
27+
let nonce = Default::default();
28+
let ciphertext = cipher.encrypt(&nonce, &*buf).unwrap();
29+
b.iter(|| cipher.decrypt(&nonce, ciphertext.as_ref()))
2830
});
2931
}
3032

0 commit comments

Comments
 (0)