Sensitive data, like passwords or keying data, should be cleared from memory as soon as they are not needed. This requires ensuring the compiler will not optimize the memory overwrite away. This proposal adds a secure_clear
function (C) and a secure_clear
function template (C++) that guarantee users that a memory area is cleared.
ojeda / secure_clear Goto Github PK
View Code? Open in Web Editor NEWC23 and C++23 proposal for a `memset_explicit` function and function template for guaranteed memory clears.
Home Page: https://www.open-std.org/jtc1/sc22/WG14/www/docs/n2897.htm
License: MIT License