aboutsummaryrefslogtreecommitdiff
path: root/src/common/password.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-25 14:50:15 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-27 22:25:57 +0000
commit3dffe71b72c3b5dd1246ed74ee4cd1ad89aaccfa (patch)
tree5559bcf502288a62f34e17902de92fcc2c60f110 /src/common/password.h
parentutils: initialize easylogging++ in on_startup (diff)
downloadmonero-3dffe71b72c3b5dd1246ed74ee4cd1ad89aaccfa.tar.xz
new wipeable_string class to replace std::string passphrases
Diffstat (limited to '')
-rw-r--r--src/common/password.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/password.h b/src/common/password.h
index ba1c30a28..01c6bf05a 100644
--- a/src/common/password.h
+++ b/src/common/password.h
@@ -32,6 +32,7 @@
#include <string>
#include <boost/optional/optional.hpp>
+#include "wipeable_string.h"
namespace tools
{
@@ -58,11 +59,10 @@ namespace tools
password_container& operator=(const password_container&) = delete;
password_container& operator=(password_container&&) = default;
- const std::string& password() const noexcept { return m_password; }
+ const epee::wipeable_string &password() const noexcept { return m_password; }
private:
- //! TODO Custom allocator that locks to RAM?
- std::string m_password;
+ epee::wipeable_string m_password;
};
struct login