From f860d487e90f570190bfbf1d789adb1ac0f77d05 Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Mon, 8 Feb 2016 20:12:12 +0100 Subject: [PATCH] Initializing crypto for benchmarks --- src/benches.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/benches.rs b/src/benches.rs index 75586bc..694ba4b 100644 --- a/src/benches.rs +++ b/src/benches.rs @@ -15,6 +15,7 @@ use super::ip::Packet; #[bench] fn crypto_salsa20(b: &mut Bencher) { + Crypto::init(); let mut crypto = Crypto::from_shared_key(CryptoMethod::ChaCha20, "test"); let mut payload = [0; 1500]; let header = [0; 8]; @@ -28,6 +29,7 @@ fn crypto_salsa20(b: &mut Bencher) { #[bench] fn crypto_aes256(b: &mut Bencher) { + Crypto::init(); if !Crypto::aes256_available() { return }