aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_format_utils.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-25 14:50:15 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-27 22:25:57 +0000
commit3dffe71b72c3b5dd1246ed74ee4cd1ad89aaccfa (patch)
tree5559bcf502288a62f34e17902de92fcc2c60f110 /src/cryptonote_basic/cryptonote_format_utils.h
parentutils: initialize easylogging++ in on_startup (diff)
downloadmonero-3dffe71b72c3b5dd1246ed74ee4cd1ad89aaccfa.tar.xz
new wipeable_string class to replace std::string passphrases
Diffstat (limited to 'src/cryptonote_basic/cryptonote_format_utils.h')
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.h b/src/cryptonote_basic/cryptonote_format_utils.h
index aebeaa6f4..714d80195 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.h
+++ b/src/cryptonote_basic/cryptonote_format_utils.h
@@ -38,6 +38,11 @@
#include "crypto/hash.h"
#include <unordered_map>
+namespace epee
+{
+ class wipeable_string;
+}
+
namespace cryptonote
{
//---------------------------------------------------------------
@@ -226,8 +231,8 @@ namespace cryptonote
bool is_valid_decomposed_amount(uint64_t amount);
void get_hash_stats(uint64_t &tx_hashes_calculated, uint64_t &tx_hashes_cached, uint64_t &block_hashes_calculated, uint64_t & block_hashes_cached);
- crypto::secret_key encrypt_key(crypto::secret_key key, const std::string &passphrase);
- crypto::secret_key decrypt_key(crypto::secret_key key, const std::string &passphrase);
+ crypto::secret_key encrypt_key(crypto::secret_key key, const epee::wipeable_string &passphrase);
+ crypto::secret_key decrypt_key(crypto::secret_key key, const epee::wipeable_string &passphrase);
#define CHECKED_GET_SPECIFIC_VARIANT(variant_var, specific_type, variable_name, fail_return_val) \
CHECK_AND_ASSERT_MES(variant_var.type() == typeid(specific_type), fail_return_val, "wrong variant type: " << variant_var.type().name() << ", expected " << typeid(specific_type).name()); \
specific_type& variable_name = boost::get<specific_type>(variant_var);