aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-05-12 10:32:21 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-05-13 18:17:34 +0100
commit86c63b8e15c291e5760b20c4ee5c227aef680603 (patch)
tree8098093c208a32011b709b192dc25ab7b858aade
parentMerge pull request #3741 (diff)
downloadmonero-86c63b8e15c291e5760b20c4ee5c227aef680603.tar.xz
chacha: fix build with GCC 8.1
-rw-r--r--src/crypto/chacha.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/chacha.h b/src/crypto/chacha.h
index 7a120931a..2b3ed8043 100644
--- a/src/crypto/chacha.h
+++ b/src/crypto/chacha.h
@@ -73,14 +73,14 @@ namespace crypto {
static_assert(sizeof(chacha_key) <= sizeof(hash), "Size of hash must be at least that of chacha_key");
tools::scrubbed_arr<char, HASH_SIZE> pwd_hash;
crypto::cn_slow_hash(data, size, pwd_hash.data(), 0/*variant*/, 0/*prehashed*/);
- memcpy(&key, pwd_hash.data(), sizeof(key));
+ memcpy(&unwrap(key), pwd_hash.data(), sizeof(key));
}
inline void generate_chacha_key_prehashed(const void *data, size_t size, chacha_key& key) {
static_assert(sizeof(chacha_key) <= sizeof(hash), "Size of hash must be at least that of chacha_key");
tools::scrubbed_arr<char, HASH_SIZE> pwd_hash;
crypto::cn_slow_hash(data, size, pwd_hash.data(), 0/*variant*/, 1/*prehashed*/);
- memcpy(&key, pwd_hash.data(), sizeof(key));
+ memcpy(&unwrap(key), pwd_hash.data(), sizeof(key));
}
inline void generate_chacha_key(std::string password, chacha_key& key) {