Scrub keys from memory just before scope end.

Partially implements #74.

Securely erases keys from memory after they are no longer needed. Might have a
performance impact, which I haven't measured (perf measurements aren't
generally reliable on laptops).

Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod
functions. Using overloads + SFINAE instead generalizes it so other types can
be marked as scrubbed without adding more boilerplate.
This commit is contained in:
moneromooo-monero 2017-10-26 10:21:06 +01:00 committed by Jonathan Roelofs
parent 38ecd0526e
commit 7193b89fe5
6 changed files with 60 additions and 23 deletions

View file

@ -42,6 +42,7 @@ add_executable(cncrypto-tests
${crypto_headers})
target_link_libraries(cncrypto-tests
PRIVATE
common
${Boost_SYSTEM_LIBRARY}
${EXTRA_LIBRARIES})
set_property(TARGET cncrypto-tests