diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-15 14:33:48 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-08-16 11:57:49 +0000 |
commit | ab74dc277aac3922a266ccae30fa2c30d9222790 (patch) | |
tree | 5846c8cf7c865417039aa90540f330e950625ae6 /src/wallet/wallet2.cpp | |
parent | common: add a class to safely wrap mlock/munlock (diff) | |
download | monero-ab74dc277aac3922a266ccae30fa2c30d9222790.tar.xz |
crypto: make secret_key automatically mlock
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<char, HASH_SIZE+1> cache_key_data; + epee::mlocked<tools::scrubbed_arr<char, HASH_SIZE+1>> 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); |