diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-07 13:27:11 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-25 19:28:03 +0000 |
commit | 1e5491e942d0a372ebebe9ef3d40941fc4a4fbb6 (patch) | |
tree | d13f404893c3994db28935da90947fbea1fc7cd5 /tests/unit_tests/serialization.cpp | |
parent | Merge pull request #2936 (diff) | |
download | monero-1e5491e942d0a372ebebe9ef3d40941fc4a4fbb6.tar.xz |
Add a chacha20 variant to go with chacha8
Diffstat (limited to 'tests/unit_tests/serialization.cpp')
-rw-r--r-- | tests/unit_tests/serialization.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index 9e76efadf..2ef1097da 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -802,12 +802,12 @@ TEST(Serialization, portability_outputs) // decrypt (copied from wallet2::decrypt) auto decrypt = [] (const std::string &ciphertext, const crypto::secret_key &skey, bool authenticated) -> string { - const size_t prefix_size = sizeof(chacha8_iv) + (authenticated ? sizeof(crypto::signature) : 0); + const size_t prefix_size = sizeof(chacha_iv) + (authenticated ? sizeof(crypto::signature) : 0); if(ciphertext.size() < prefix_size) return {}; - crypto::chacha8_key key; - crypto::generate_chacha8_key(&skey, sizeof(skey), key); - const crypto::chacha8_iv &iv = *(const crypto::chacha8_iv*)&ciphertext[0]; + crypto::chacha_key key; + crypto::generate_chacha_key(&skey, sizeof(skey), key); + const crypto::chacha_iv &iv = *(const crypto::chacha_iv*)&ciphertext[0]; std::string plaintext; plaintext.resize(ciphertext.size() - prefix_size); if (authenticated) |