authorgravatar for 14938807+xackus@users.noreply.github.comxackus <14938807+xackus@users.noreply.github.com> 2020-09-07 22:07:34+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-08 12:54:28-04:00
logb8b68cb279e8f51a8aa7c67aa42cefc644375b74
treeceb53b69ff40a1539b6973380ac69a0560c35ad1
parent8716fde7bcb2fa472438e936128cb8f8512680ab

std: clean up bitrotten imports in crypto


9 files changed, 23 insertions(+), 31 deletions(-)

lib/std/crypto/benchmark.zig+2-2
...@@ -5,8 +5,8 @@...@@ -5,8 +5,8 @@
5// and substantial portions of the software.5// and substantial portions of the software.
6// zig run benchmark.zig --release-fast --override-lib-dir ..6// zig run benchmark.zig --release-fast --override-lib-dir ..
77
8const builtin = @import("builtin");8const std = @import("../std.zig");
9const std = @import("std");9const builtin = std.builtin;
10const mem = std.mem;10const mem = std.mem;
11const time = std.time;11const time = std.time;
12const Timer = time.Timer;12const Timer = time.Timer;
lib/std/crypto/blake2.zig+4-4
...@@ -3,10 +3,10 @@...@@ -3,10 +3,10 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const mem = @import("../mem.zig");6const std = @import("../std.zig");
7const builtin = @import("builtin");7const mem = std.mem;
8const debug = @import("../debug.zig");8const math = std.math;
9const math = @import("../math.zig");9const debug = std.debug;
10const htest = @import("test.zig");10const htest = @import("test.zig");
1111
12const RoundParam = struct {12const RoundParam = struct {
lib/std/crypto/chacha20.zig-2
...@@ -7,10 +7,8 @@...@@ -7,10 +7,8 @@
77
8const std = @import("../std.zig");8const std = @import("../std.zig");
9const mem = std.mem;9const mem = std.mem;
10const endian = std.endian;
11const assert = std.debug.assert;10const assert = std.debug.assert;
12const testing = std.testing;11const testing = std.testing;
13const builtin = @import("builtin");
14const maxInt = std.math.maxInt;12const maxInt = std.math.maxInt;
15const Poly1305 = std.crypto.onetimeauth.Poly1305;13const Poly1305 = std.crypto.onetimeauth.Poly1305;
1614
lib/std/crypto/md5.zig+4-6
...@@ -3,12 +3,10 @@...@@ -3,12 +3,10 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const mem = @import("../mem.zig");6const std = @import("../std.zig");
7const math = @import("../math.zig");7const mem = std.mem;
8const endian = @import("../endian.zig");8const math = std.math;
9const builtin = @import("builtin");9const debug = std.debug;
10const debug = @import("../debug.zig");
11const fmt = @import("../fmt.zig");
1210
13const RoundParam = struct {11const RoundParam = struct {
14 a: usize,12 a: usize,
lib/std/crypto/poly1305.zig+1-1
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const std = @import("std");6const std = @import("../std.zig");
7const mem = std.mem;7const mem = std.mem;
88
9pub const Poly1305 = struct {9pub const Poly1305 = struct {
lib/std/crypto/sha1.zig+4-5
...@@ -3,11 +3,10 @@...@@ -3,11 +3,10 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const mem = @import("../mem.zig");6const std = @import("../std.zig");
7const math = @import("../math.zig");7const mem = std.mem;
8const endian = @import("../endian.zig");8const math = std.math;
9const debug = @import("../debug.zig");9const debug = std.debug;
10const builtin = @import("builtin");
1110
12const RoundParam = struct {11const RoundParam = struct {
13 a: usize,12 a: usize,
lib/std/crypto/sha2.zig+4-5
...@@ -3,11 +3,10 @@...@@ -3,11 +3,10 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const mem = @import("../mem.zig");6const std = @import("../std.zig");
7const math = @import("../math.zig");7const mem = std.mem;
8const endian = @import("../endian.zig");8const math = std.math;
9const debug = @import("../debug.zig");9const debug = std.debug;
10const builtin = @import("builtin");
11const htest = @import("test.zig");10const htest = @import("test.zig");
1211
13/////////////////////12/////////////////////
lib/std/crypto/sha3.zig+4-5
...@@ -3,11 +3,10 @@...@@ -3,11 +3,10 @@
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.5// and substantial portions of the software.
6const mem = @import("../mem.zig");6const std = @import("../std.zig");
7const math = @import("../math.zig");7const mem = std.mem;
8const endian = @import("../endian.zig");8const math = std.math;
9const debug = @import("../debug.zig");9const debug = std.debug;
10const builtin = @import("builtin");
11const htest = @import("test.zig");10const htest = @import("test.zig");
1211
13pub const Sha3_224 = Keccak(224, 0x06);12pub const Sha3_224 = Keccak(224, 0x06);
lib/std/crypto/test.zig-1
...@@ -5,7 +5,6 @@...@@ -5,7 +5,6 @@
5// and substantial portions of the software.5// and substantial portions of the software.
6const std = @import("../std.zig");6const std = @import("../std.zig");
7const testing = std.testing;7const testing = std.testing;
8const mem = std.mem;
9const fmt = std.fmt;8const fmt = std.fmt;
109
11// Hash using the specified hasher `H` asserting `expected == H(input)`.10// Hash using the specified hasher `H` asserting `expected == H(input)`.