diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-06-08 20:04:32 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2014-06-12 19:05:52 -0400 |
commit | da37b6f15b6eb1f7b4ac9802a3350413d303a5c9 (patch) | |
tree | 06a7aceb34d1e53ca4bfd28d3fbc13b5ef0d8a30 /src/cryptonote_core | |
parent | reworked command line args for simplewallet. (diff) | |
download | monero-da37b6f15b6eb1f7b4ac9802a3350413d303a5c9.tar.xz |
allow two-random-numbers wallet generation (but not as default)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/account.cpp | 4 | ||||
-rw-r--r-- | src/cryptonote_core/account.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp index f4de36738..7da1c6745 100644 --- a/src/cryptonote_core/account.cpp +++ b/src/cryptonote_core/account.cpp @@ -33,7 +33,7 @@ DISABLE_VS_WARNINGS(4244 4345) m_keys = account_keys(); } //----------------------------------------------------------------- - crypto::secret_key account_base::generate(const crypto::secret_key& recovery_key, bool recover) + crypto::secret_key account_base::generate(const crypto::secret_key& recovery_key, bool recover, bool two_random) { crypto::secret_key first = generate_keys(m_keys.m_account_address.m_spend_public_key, m_keys.m_spend_secret_key, recovery_key, recover); @@ -41,7 +41,7 @@ DISABLE_VS_WARNINGS(4244 4345) crypto::secret_key second; blake256_hash((uint8_t *)&second, (uint8_t *)&first, sizeof(crypto::secret_key)); - generate_keys(m_keys.m_account_address.m_view_public_key, m_keys.m_view_secret_key, second, true); + generate_keys(m_keys.m_account_address.m_view_public_key, m_keys.m_view_secret_key, second, two_random ? false : true); m_creation_timestamp = time(NULL); return first; } diff --git a/src/cryptonote_core/account.h b/src/cryptonote_core/account.h index f07d4dd79..cb77d7c4e 100644 --- a/src/cryptonote_core/account.h +++ b/src/cryptonote_core/account.h @@ -31,7 +31,7 @@ namespace cryptonote { public: account_base(); - crypto::secret_key generate(const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false); + crypto::secret_key generate(const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false, bool two_random = false); const account_keys& get_keys() const; std::string get_public_address_str(); |