authorgravatar for datamanrb@gmail.comdata-man <datamanrb@gmail.com> 2019-12-07 03:01:24+05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-06 17:14:10-05:00
log80a72c225cf2a08e683936921dfda07f93cef1b8
treef6688dc6f99046251dde5e088eda126dd03c4a26
parent008e42f48351453b2174b361847c5470e6216fa5

Crypto benchmark fixes


1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/crypto/benchmark.zig+3-3
......@@ -1,7 +1,7 @@
11// zig run benchmark.zig --release-fast --override-lib-dir ..
22
33const builtin = @import("builtin");
4const std = @import("../std.zig");
4const std = @import("std");
55const time = std.time;
66const Timer = time.Timer;
77const crypto = std.crypto;
......@@ -67,7 +67,7 @@ pub fn benchmarkMac(comptime Mac: var, comptime bytes: comptime_int) !u64 {
6767 var timer = try Timer.start();
6868 const start = timer.lap();
6969 while (offset < bytes) : (offset += in.len) {
70 Mac.create(key[0..], in[0..], key);
70 Mac.create(key[0..], in[0..], key[0..]);
7171 }
7272 const end = timer.read();
7373
......@@ -94,7 +94,7 @@ pub fn benchmarkKeyExchange(comptime DhKeyExchange: var, comptime exchange_count
9494 {
9595 var i: usize = 0;
9696 while (i < exchange_count) : (i += 1) {
97 _ = DhKeyExchange.create(out[0..], out, in);
97 _ = DhKeyExchange.create(out[0..], out[0..], in[0..]);
9898 }
9999 }
100100 const end = timer.read();