| author | |
| committer | |
| log | 9552ca4c2e9a478fa9187b1eaf64d82c7c2d2b84 |
| tree | 0e5114396550b9f5e0d77bf9e564080c3ae525a3 |
| parent | 76789ff59c8a63d75ffcb556cc05713ebbea4c0c |
1 files changed, 2 insertions(+), 0 deletions(-)
lib/std/crypto.zig+2| ... | ... | @@ -417,6 +417,8 @@ test "issue #4532: no index out of bounds" { |
| 417 | 417 | |
| 418 | 418 | /// Sets a slice to zeroes. |
| 419 | 419 | /// Prevents the store from being optimized out. |
| 420 | /// Does not clear copies in registers or elsewhere in memory. | |
| 421 | /// Wiping a value held in registers can force an extra copy into memory. | |
| 420 | 422 | pub fn secureZero(comptime T: type, s: []volatile T) void { |
| 421 | 423 | @memset(s, std.mem.zeroes(T)); |
| 422 | 424 | } |