add a memwipe function

It's meant to avoid being optimized out

memory_cleanse lifted from bitcoin
This commit is contained in:
moneromooo-monero
2017-10-26 10:16:48 +01:00
parent 8a8c918dc3
commit 000666ff78
6 changed files with 228 additions and 0 deletions
+8
View File
@@ -768,3 +768,11 @@ option(BUILD_GUI_DEPS "Build GUI dependencies." OFF)
option(INSTALL_VENDORED_LIBUNBOUND "Install libunbound binary built from source vendored with this repo." OFF)
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-std=c11 HAVE_C11)
include(CheckLibraryExists)
check_library_exists(c memset_s "string.h" HAVE_MEMSET_S)
check_library_exists(c explicit_bzero "strings.h" HAVE_EXPLICIT_BZERO)