aboutsummaryrefslogtreecommitdiff
path: root/lib/std/crypto/sha2.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-19 18:06:16 -0400
committerGitHub <noreply@github.com>2020-03-19 18:06:16 -0400
commitdc04e97098010f590d109e6e70d4afe79cd8f01b (patch)
treebed11818fd80fe7b4557f4253c8d5562de773624 /lib/std/crypto/sha2.zig
parent555a2c03286507ffe4bd3bea2154dbfb719ebef1 (diff)
parent160367e0ddcb36b6957e603d869507b9d7542edc (diff)
downloadzig-dc04e97098010f590d109e6e70d4afe79cd8f01b.tar.gz
zig-dc04e97098010f590d109e6e70d4afe79cd8f01b.zip
Merge pull request #4752 from ziglang/slice-array
slicing with comptime start and end indexes results in pointer-to-array
Diffstat (limited to 'lib/std/crypto/sha2.zig')
-rw-r--r--lib/std/crypto/sha2.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/crypto/sha2.zig b/lib/std/crypto/sha2.zig
index fd7ad532a3..f004bceac3 100644
--- a/lib/std/crypto/sha2.zig
+++ b/lib/std/crypto/sha2.zig
@@ -167,8 +167,7 @@ fn Sha2_32(comptime params: Sha2Params32) type {
const rr = d.s[0 .. params.out_len / 32];
for (rr) |s, j| {
- // TODO https://github.com/ziglang/zig/issues/863
- mem.writeIntSliceBig(u32, out[4 * j .. 4 * j + 4], s);
+ mem.writeIntBig(u32, out[4 * j ..][0..4], s);
}
}
@@ -509,8 +508,7 @@ fn Sha2_64(comptime params: Sha2Params64) type {
const rr = d.s[0 .. params.out_len / 64];
for (rr) |s, j| {
- // TODO https://github.com/ziglang/zig/issues/863
- mem.writeIntSliceBig(u64, out[8 * j .. 8 * j + 8], s);
+ mem.writeIntBig(u64, out[8 * j ..][0..8], s);
}
}