zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit e6bfa377d1144d95cbf42d340852d272044d03f2 (tree)
parent 8b3c1ed7342950fd76a4aff6c7565789a71d9e61
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 16 Nov 2020 18:10:41 -0700

std.crypto.isap: fix callsites of secureZero

Diffstat:
Mlib/std/crypto/isap.zig | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/std/crypto/isap.zig b/lib/std/crypto/isap.zig @@ -142,7 +142,7 @@ pub const IsapA128A = struct { while (j < out_len) : (j += 8) { mem.writeIntBig(u64, out[j..][0..8], isap.block[j / 8]); } - mem.secureZero(u64, &isap.block); + std.crypto.utils.secureZero(u64, &isap.block); return out; } @@ -173,7 +173,7 @@ pub const IsapA128A = struct { var tag: [16]u8 = undefined; mem.writeIntBig(u64, tag[0..8], isap.block[0]); mem.writeIntBig(u64, tag[8..16], isap.block[1]); - mem.secureZero(u64, &isap.block); + std.crypto.utils.secureZero(u64, &isap.block); return tag; } @@ -209,7 +209,7 @@ pub const IsapA128A = struct { break; } } - mem.secureZero(u64, &isap.block); + std.crypto.utils.secureZero(u64, &isap.block); } pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void { @@ -223,7 +223,7 @@ pub const IsapA128A = struct { for (computed_tag) |_, j| { acc |= (computed_tag[j] ^ tag[j]); } - mem.secureZero(u8, &computed_tag); + std.crypto.utils.secureZero(u8, &computed_tag); if (acc != 0) { return error.AuthenticationFailed; }