aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/crypto.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-15 14:33:48 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-08-16 11:57:49 +0000
commitab74dc277aac3922a266ccae30fa2c30d9222790 (patch)
tree5846c8cf7c865417039aa90540f330e950625ae6 /src/crypto/crypto.h
parentcommon: add a class to safely wrap mlock/munlock (diff)
downloadmonero-ab74dc277aac3922a266ccae30fa2c30d9222790.tar.xz
crypto: make secret_key automatically mlock
Diffstat (limited to '')
-rw-r--r--src/crypto/crypto.h3
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;