diff options
author | guzzi_jones <guzzijones12@gmail.com> | 2016-08-01 00:48:53 +0000 |
---|---|---|
committer | guzzi_jones <guzzijones12@gmail.com> | 2016-08-01 02:32:14 +0000 |
commit | f0c0a3fb65c99b38dc63bb979baaee0d89bb0eaa (patch) | |
tree | 9074f9319ef116ed451e68df0b6fec97f490d3b8 /src/simplewallet/password_container.h | |
parent | Merge pull request #937 (diff) | |
download | monero-f0c0a3fb65c99b38dc63bb979baaee0d89bb0eaa.tar.xz |
Fix #864
Squashed commit of the following:
commit 9af9e4223b58bbb65a3519af2c2bfc273cbd23d6
fixed some formatting
commit c7920e1cf88ff46eb9294101344d9a567f22e2da
Merge: 97eb28b 1da1c68
fix#864 fix using boolean
commit 97eb28ba5dd49ddde8c8785f39b24d955e5de31c
Fix #864 boolean value used to verify on new wallet
commit 1da1c68bd3a9a373c70482b6e6e95251096149f1
fix #864 changed to boolean to prompt for verify
commit 5bee96652434762d2c91ce31a1b1c9f169446ddc
fix 864; made variable names easier for understanding branching.
commit 45715960d30293f781b2ff9e5e647c2ec893f4a3
fix #864; allow password to be entered twice for new wallets for verification.
fix #864 password entry verification; ammended boolean
fix #864 ; default constructor for password_container should set verify=true
Diffstat (limited to '')
-rw-r--r-- | src/simplewallet/password_container.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/simplewallet/password_container.h b/src/simplewallet/password_container.h index 64567978d..62f43aa37 100644 --- a/src/simplewallet/password_container.h +++ b/src/simplewallet/password_container.h @@ -31,6 +31,7 @@ #pragma once #include <string> +#include <boost/program_options/variables_map.hpp> namespace tools { @@ -38,10 +39,9 @@ namespace tools { public: static const size_t max_password_size = 1024; - - password_container(); - password_container(std::string&& password); + password_container(bool verify); password_container(password_container&& rhs); + password_container(std::string&& password); ~password_container(); void clear(); @@ -51,11 +51,14 @@ namespace tools bool read_password(const char *message = "password"); private: + //delete constructor with no parameters + password_container(); bool read_from_file(); - bool read_from_tty(); + bool read_from_tty(std::string & pass); + bool read_from_tty_double_check(const char *message); - private: bool m_empty; std::string m_password; + bool m_verify; }; } |