mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 14:00:21 -04:00
new wipeable_string class to replace std::string passphrases
This commit is contained in:
parent
7a2a574118
commit
3dffe71b72
15 changed files with 293 additions and 68 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue