From ab74dc277aac3922a266ccae30fa2c30d9222790 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 15 Jul 2018 14:33:48 +0100 Subject: crypto: make secret_key automatically mlock --- src/wallet/wallet2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index ea3cca1ce..115438351 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2963,7 +2963,7 @@ void wallet2::setup_keys(const epee::wipeable_string &password) } static_assert(HASH_SIZE == sizeof(crypto::chacha_key), "Mismatched sizes of hash and chacha key"); - tools::scrubbed_arr cache_key_data; + epee::mlocked> cache_key_data; memcpy(cache_key_data.data(), &key, HASH_SIZE); cache_key_data[HASH_SIZE] = CACHE_KEY_TAIL; cn_fast_hash(cache_key_data.data(), HASH_SIZE+1, (crypto::hash&)m_cache_key); -- cgit v1.2.3