Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rc4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description = "Pure Rust implementation of the RC4 stream cipher"
cipher = { version = "0.5", features = ["stream-wrapper"] }

[dev-dependencies]
cipher = { version = "0.5", features = ["dev"] }
hex-literal = "1"

[features]
Expand Down
16 changes: 16 additions & 0 deletions rc4/benches/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Basic benchmarks
#![feature(test)]
extern crate test;

cipher::stream_cipher_bench!(
// TODO: use `Key:` option instead after macro is fixed upstream
Init: {
use cipher::KeyInit;
let key = test::black_box(Default::default());
rc4::Rc4::<cipher::consts::U5>::new(&key)
};
rc4_bench1_16b 16;
rc4_bench2_256b 256;
rc4_bench3_1kib 1024;
rc4_bench4_16kib 16384;
);