diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-05-31 15:32:54 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-05-31 15:32:54 +0100 |
commit | f7767c65085cce4ca8eea975f47d26b76909e030 (patch) | |
tree | 67fc050d857861d3f5f8d22827f816f44286a662 /src | |
parent | Merge pull request #296 (diff) | |
download | monero-f7767c65085cce4ca8eea975f47d26b76909e030.tar.xz |
account: add a forget_spend_key method
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/account.cpp | 5 | ||||
-rw-r--r-- | src/cryptonote_core/account.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp index a4de8fb25..55e368836 100644 --- a/src/cryptonote_core/account.cpp +++ b/src/cryptonote_core/account.cpp @@ -59,6 +59,11 @@ DISABLE_VS_WARNINGS(4244 4345) m_keys = account_keys(); } //----------------------------------------------------------------- + void account_base::forget_spend_key() + { + m_keys.m_spend_secret_key = crypto::secret_key(); + } + //----------------------------------------------------------------- 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); diff --git a/src/cryptonote_core/account.h b/src/cryptonote_core/account.h index 46f14fcbb..dcfd9e8d9 100644 --- a/src/cryptonote_core/account.h +++ b/src/cryptonote_core/account.h @@ -67,6 +67,8 @@ namespace cryptonote bool load(const std::string& file_path); bool store(const std::string& file_path); + void forget_spend_key(); + template <class t_archive> inline void serialize(t_archive &a, const unsigned int /*ver*/) { |