diff --git a/main.cpp b/main.cpp index 73b9baf..18ac540 100644 --- a/main.cpp +++ b/main.cpp @@ -151,16 +151,13 @@ main(int ac, const char* av[]) string deamon_url {*deamon_url_opt}; if (testnet && deamon_url == "http:://127.0.0.1:18081") - { deamon_url = "http:://127.0.0.1:28081"; - } uint64_t mempool_info_timeout {5000}; try { mempool_info_timeout = boost::lexical_cast(*mempool_info_timeout_opt); - } catch (boost::bad_lexical_cast &e) { diff --git a/src/page.h b/src/page.h index f65bca8..ee4c63c 100644 --- a/src/page.h +++ b/src/page.h @@ -3160,7 +3160,7 @@ namespace xmreg const size_t header_lenght = 2 * sizeof(crypto::public_key); const size_t key_img_size = sizeof(crypto::key_image); const size_t record_lenght = key_img_size + sizeof(crypto::signature); - const size_t chacha_length = sizeof(crypto::chacha8_key); + const size_t chacha_length = sizeof(crypto::chacha_key); if (decoded_raw_data.size() < header_lenght) { diff --git a/src/tools.cpp b/src/tools.cpp index 78604cd..89049b4 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -1035,7 +1035,7 @@ decrypt(const std::string &ciphertext, bool authenticated) { - const size_t prefix_size = sizeof(chacha8_iv) + const size_t prefix_size = sizeof(chacha_iv) + (authenticated ? sizeof(crypto::signature) : 0); if (ciphertext.size() < prefix_size) { @@ -1043,10 +1043,10 @@ decrypt(const std::string &ciphertext, return {}; } - crypto::chacha8_key key; - crypto::generate_chacha8_key(&skey, sizeof(skey), key); + crypto::chacha_key key; + crypto::generate_chacha_key(&skey, sizeof(skey), key); - const crypto::chacha8_iv &iv = *(const crypto::chacha8_iv*)&ciphertext[0]; + const crypto::chacha_iv &iv = *(const crypto::chacha_iv*)&ciphertext[0]; std::string plaintext;