aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorSarang Noether <32460187+SarangNoether@users.noreply.github.com>2020-04-01 08:31:00 -0400
committerSarang Noether <32460187+SarangNoether@users.noreply.github.com>2020-04-01 08:31:00 -0400
commit80d5320fff9c948f54b4379f3c2f3bc684e7f356 (patch)
treebe950820fe376cd19e8a5349680f24ffb62adb36 /src/wallet/wallet2.cpp
parentMerge pull request #6336 (diff)
downloadmonero-80d5320fff9c948f54b4379f3c2f3bc684e7f356.tar.xz
Hash domain separation
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 6d2fff17b..90682e60c 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -102,10 +102,6 @@ using namespace cryptonote;
// used to target a given block weight (additional outputs may be added on top to build fee)
#define TX_WEIGHT_TARGET(bytes) (bytes*2/3)
-// arbitrary, used to generate different hashes from the same input
-#define CHACHA8_KEY_TAIL 0x8c
-#define CACHE_KEY_TAIL 0x8d
-
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\004"
#define SIGNED_TX_PREFIX "Monero signed tx set\004"
#define MULTISIG_UNSIGNED_TX_PREFIX "Monero multisig unsigned tx set\001"
@@ -3932,7 +3928,7 @@ void wallet2::setup_keys(const epee::wipeable_string &password)
static_assert(HASH_SIZE == sizeof(crypto::chacha_key), "Mismatched sizes of hash and chacha key");
epee::mlocked<tools::scrubbed_arr<char, HASH_SIZE+1>> cache_key_data;
memcpy(cache_key_data.data(), &key, HASH_SIZE);
- cache_key_data[HASH_SIZE] = CACHE_KEY_TAIL;
+ cache_key_data[HASH_SIZE] = config::HASH_KEY_WALLET_CACHE;
cn_fast_hash(cache_key_data.data(), HASH_SIZE+1, (crypto::hash&)m_cache_key);
get_ringdb_key();
}