authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-16 18:10:41-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-16 18:10:41-07:00
loge6bfa377d1144d95cbf42d340852d272044d03f2
tree8a9bcacba469bec1f93a3f34b2a9dbcc973c64a0
parent8b3c1ed7342950fd76a4aff6c7565789a71d9e61

std.crypto.isap: fix callsites of secureZero


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

lib/std/crypto/isap.zig+4-4
......@@ -142,7 +142,7 @@ pub const IsapA128A = struct {
142142 while (j < out_len) : (j += 8) {
143143 mem.writeIntBig(u64, out[j..][0..8], isap.block[j / 8]);
144144 }
145 mem.secureZero(u64, &isap.block);
145 std.crypto.utils.secureZero(u64, &isap.block);
146146 return out;
147147 }
148148
......@@ -173,7 +173,7 @@ pub const IsapA128A = struct {
173173 var tag: [16]u8 = undefined;
174174 mem.writeIntBig(u64, tag[0..8], isap.block[0]);
175175 mem.writeIntBig(u64, tag[8..16], isap.block[1]);
176 mem.secureZero(u64, &isap.block);
176 std.crypto.utils.secureZero(u64, &isap.block);
177177 return tag;
178178 }
179179
......@@ -209,7 +209,7 @@ pub const IsapA128A = struct {
209209 break;
210210 }
211211 }
212 mem.secureZero(u64, &isap.block);
212 std.crypto.utils.secureZero(u64, &isap.block);
213213 }
214214
215215 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 {
223223 for (computed_tag) |_, j| {
224224 acc |= (computed_tag[j] ^ tag[j]);
225225 }
226 mem.secureZero(u8, &computed_tag);
226 std.crypto.utils.secureZero(u8, &computed_tag);
227227 if (acc != 0) {
228228 return error.AuthenticationFailed;
229229 }