diff options
| author | Marc Tiehuis <marctiehuis@gmail.com> | 2018-08-18 12:15:39 +1200 |
|---|---|---|
| committer | Marc Tiehuis <marctiehuis@gmail.com> | 2018-08-18 12:15:39 +1200 |
| commit | 53b18b079189cce355767ce4fde4fc586f0d3248 (patch) | |
| tree | 73602f288599dd105b544b3ea7b4af02cf161623 /std/array_list.zig | |
| parent | 1da93caced5511d5b2d666fe40c5db108580e2aa (diff) | |
| download | zig-53b18b079189cce355767ce4fde4fc586f0d3248.tar.gz zig-53b18b079189cce355767ce4fde4fc586f0d3248.zip | |
Add secureZero function
This is identical to `mem.set(u8, slice, 0)` except that it will never
be optimized out by the compiler. Intended usage is for clearing
secret data.
The resulting assembly has been manually verified in --release-* modes.
It would be valuable to test the 'never be optimized out' claim in tests
but this is harder than initially expected due to how much Zig appears
to know locally. May be doable with @intToPtr, @ptrToInt to get around
known data dependencies but I could not work it out right now.
Diffstat (limited to 'std/array_list.zig')
0 files changed, 0 insertions, 0 deletions
