commit b8b68cb279e8f51a8aa7c67aa42cefc644375b74 (tree)
parent 8716fde7bcb2fa472438e936128cb8f8512680ab
Author: xackus <14938807+xackus@users.noreply.github.com>
Date: Mon, 7 Sep 2020 22:07:34 +0200
std: clean up bitrotten imports in crypto
Diffstat:
9 files changed, 23 insertions(+), 31 deletions(-)
diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig
@@ -5,8 +5,8 @@
// and substantial portions of the software.
// zig run benchmark.zig --release-fast --override-lib-dir ..
-const builtin = @import("builtin");
-const std = @import("std");
+const std = @import("../std.zig");
+const builtin = std.builtin;
const mem = std.mem;
const time = std.time;
const Timer = time.Timer;
diff --git a/lib/std/crypto/blake2.zig b/lib/std/crypto/blake2.zig
@@ -3,10 +3,10 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const mem = @import("../mem.zig");
-const builtin = @import("builtin");
-const debug = @import("../debug.zig");
-const math = @import("../math.zig");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
const htest = @import("test.zig");
const RoundParam = struct {
diff --git a/lib/std/crypto/chacha20.zig b/lib/std/crypto/chacha20.zig
@@ -7,10 +7,8 @@
const std = @import("../std.zig");
const mem = std.mem;
-const endian = std.endian;
const assert = std.debug.assert;
const testing = std.testing;
-const builtin = @import("builtin");
const maxInt = std.math.maxInt;
const Poly1305 = std.crypto.onetimeauth.Poly1305;
diff --git a/lib/std/crypto/md5.zig b/lib/std/crypto/md5.zig
@@ -3,12 +3,10 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const builtin = @import("builtin");
-const debug = @import("../debug.zig");
-const fmt = @import("../fmt.zig");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
const RoundParam = struct {
a: usize,
diff --git a/lib/std/crypto/poly1305.zig b/lib/std/crypto/poly1305.zig
@@ -3,7 +3,7 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const std = @import("std");
+const std = @import("../std.zig");
const mem = std.mem;
pub const Poly1305 = struct {
diff --git a/lib/std/crypto/sha1.zig b/lib/std/crypto/sha1.zig
@@ -3,11 +3,10 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
const RoundParam = struct {
a: usize,
diff --git a/lib/std/crypto/sha2.zig b/lib/std/crypto/sha2.zig
@@ -3,11 +3,10 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
const htest = @import("test.zig");
/////////////////////
diff --git a/lib/std/crypto/sha3.zig b/lib/std/crypto/sha3.zig
@@ -3,11 +3,10 @@
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
const htest = @import("test.zig");
pub const Sha3_224 = Keccak(224, 0x06);
diff --git a/lib/std/crypto/test.zig b/lib/std/crypto/test.zig
@@ -5,7 +5,6 @@
// and substantial portions of the software.
const std = @import("../std.zig");
const testing = std.testing;
-const mem = std.mem;
const fmt = std.fmt;
// Hash using the specified hasher `H` asserting `expected == H(input)`.