aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-10-26 10:21:06 +0100
committerJonathan Roelofs <jonathan@codesourcery.com>2017-12-16 15:40:33 -0700
commit7193b89fe567327bb78f4c61c887b2e2fad2ed51 (patch)
treec3064389fdc8d4a07b78882bc77cf475cb4e8d9d /contrib
parentMerge pull request #2881 (diff)
downloadmonero-7193b89fe567327bb78f4c61c887b2e2fad2ed51.tar.xz
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/include/span.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/span.h b/contrib/epee/include/span.h
index ea4ba63dd..5660c09d1 100644
--- a/contrib/epee/include/span.h
+++ b/contrib/epee/include/span.h
@@ -108,7 +108,7 @@ namespace epee
template<typename T>
constexpr bool has_padding() noexcept
{
- return !std::is_pod<T>() || alignof(T) != 1;
+ return !std::is_pod<T>::value || alignof(T) != 1;
}
//! \return Cast data from `src` as `span<const std::uint8_t>`.