replace zero with crypto secureZero

This commit is contained in:
Emil Lerch 2022-02-08 22:37:20 -08:00
parent 0371e5a5e0
commit 628dd1da1d
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ pub const Credentials = struct {
};
}
pub fn deinit(self: Self) void {
for (self.secret_key) |_, i| self.secret_key[i] = 0;
self.allocator.free(self.access_key);
std.crypto.utils.secureZero(u8, self.secret_key);
self.allocator.free(self.secret_key);
self.allocator.free(self.access_key);
if (self.session_token) |t| self.allocator.free(t);
}
};