crypto: make secret_key automatically mlock

This commit is contained in:
moneromooo-monero 2018-07-15 14:33:48 +01:00
parent 70271fa788
commit ab74dc277a
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 12 additions and 10 deletions

View file

@ -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;