mirror of
https://github.com/monero-project/monero.git
synced 2025-12-23 00:10:57 -05:00
cryptonote: do not overwrite const data
This commit is contained in:
parent
49ce59462a
commit
54a4c1cbf7
2 changed files with 4 additions and 4 deletions
|
|
@ -994,7 +994,7 @@ namespace cryptonote
|
|||
block_hashes_cached = block_hashes_cached_count;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
crypto::secret_key encrypt_key(const crypto::secret_key &key, const std::string &passphrase)
|
||||
crypto::secret_key encrypt_key(crypto::secret_key key, const std::string &passphrase)
|
||||
{
|
||||
crypto::hash hash;
|
||||
crypto::cn_slow_hash(passphrase.data(), passphrase.size(), hash);
|
||||
|
|
@ -1002,7 +1002,7 @@ namespace cryptonote
|
|||
return key;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
crypto::secret_key decrypt_key(const crypto::secret_key &key, const std::string &passphrase)
|
||||
crypto::secret_key decrypt_key(crypto::secret_key key, const std::string &passphrase)
|
||||
{
|
||||
crypto::hash hash;
|
||||
crypto::cn_slow_hash(passphrase.data(), passphrase.size(), hash);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue