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/crypto/crypto.h | |
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/crypto/crypto.h')
-rw-r--r-- | src/crypto/crypto.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index a2d61b04e..c1576a218 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -41,6 +41,7 @@ #include "common/pod-class.h" #include "common/util.h" #include "memwipe.h" +#include "mlocker.h" #include "generic-ops.h" #include "hex.h" #include "span.h" @@ -65,7 +66,7 @@ namespace crypto { friend class crypto_ops; }; - using secret_key = tools::scrubbed<ec_scalar>; + using secret_key = epee::mlocked<tools::scrubbed<ec_scalar>>; POD_CLASS public_keyV { std::vector<public_key> keys; |