account: add a forget_spend_key method

This commit is contained in:
moneromooo-monero 2015-05-31 15:32:54 +01:00
parent 72248cfe6f
commit f7767c6508
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
2 changed files with 7 additions and 0 deletions

View File

@ -59,6 +59,11 @@ DISABLE_VS_WARNINGS(4244 4345)
m_keys = account_keys(); 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 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); crypto::secret_key first = generate_keys(m_keys.m_account_address.m_spend_public_key, m_keys.m_spend_secret_key, recovery_key, recover);

View File

@ -67,6 +67,8 @@ namespace cryptonote
bool load(const std::string& file_path); bool load(const std::string& file_path);
bool store(const std::string& file_path); bool store(const std::string& file_path);
void forget_spend_key();
template <class t_archive> template <class t_archive>
inline void serialize(t_archive &a, const unsigned int /*ver*/) inline void serialize(t_archive &a, const unsigned int /*ver*/)
{ {