secureZero the account key on deinit of the account

This commit is contained in:
Emil Lerch 2024-02-01 08:42:55 -08:00
parent 614e2338e8
commit 17dea476e3
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -24,6 +24,7 @@ pub fn accountForId(allocator: std.mem.Allocator, account_id: []const u8) !Self
} }
pub fn deinit(self: Self) void { pub fn deinit(self: Self) void {
std.crypto.utils.secureZero(u8, self.root_account_key);
self.allocator.free(self.root_account_key); self.allocator.free(self.root_account_key);
} }