diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-12-17 13:00:11 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-12-17 13:00:11 +0200 |
commit | a3a8343051abfe081c5726bb6ac9d44095068d07 (patch) | |
tree | 957528b7b00218968108a75608b173df0cf45be1 /src/crypto/crypto.h | |
parent | Merge pull request #2877 (diff) | |
parent | Scrub keys from memory just before scope end. (diff) | |
download | monero-a3a8343051abfe081c5726bb6ac9d44095068d07.tar.xz |
Merge pull request #2857
7193b89f Scrub keys from memory just before scope end. (moneromooo-monero)
Diffstat (limited to 'src/crypto/crypto.h')
-rw-r--r-- | src/crypto/crypto.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index abdea0165..0ce5e6d7a 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -36,9 +36,12 @@ #include <boost/thread/lock_guard.hpp> #include <boost/utility/value_init.hpp> #include <boost/optional.hpp> +#include <type_traits> #include <vector> #include "common/pod-class.h" +#include "common/util.h" +#include "common/memwipe.h" #include "generic-ops.h" #include "hex.h" #include "span.h" @@ -65,9 +68,7 @@ namespace crypto { friend class crypto_ops; }; - POD_CLASS secret_key: ec_scalar { - friend class crypto_ops; - }; + using secret_key = tools::scrubbed<ec_scalar>; POD_CLASS public_keyV { std::vector<public_key> keys; |