From 1b6c8b2bbfae6ede6c0efc189c275889f06d3bea Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Sun, 13 May 2018 13:33:03 +0800 Subject: [PATCH] Decoding of key images and outputs files fixed https://github.com/moneroexamples/onion-monero-blockchain-explorer/issues/115 --- src/page.h | 6 +++--- src/tools.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/page.h b/src/page.h index be1a2ba..c903392 100644 --- a/src/page.h +++ b/src/page.h @@ -3440,12 +3440,11 @@ public: reinterpret_cast( decoded_raw_data.data()); - address_parse_info address_info {*xmr_address, false}; + address_parse_info address_info {*xmr_address, false, false, crypto::null_hash8}; context.insert({"address" , REMOVE_HASH_BRAKETS( xmreg::print_address(address_info, nettype))}); - context.insert({"viewkey" , REMOVE_HASH_BRAKETS( - fmt::format("{:s}", prv_view_key))}); + context.insert({"viewkey" , pod_to_hex(prv_view_key)}); context.insert({"has_total_xmr" , false}); context.insert({"total_xmr" , string{}}); context.insert({"output_keys" , mstch::array{}}); @@ -3461,6 +3460,7 @@ public: std::stringstream iss; iss << body; boost::archive::portable_binary_iarchive ar(iss); + //boost::archive::binary_iarchive ar(iss); ar >> outputs; diff --git a/src/tools.cpp b/src/tools.cpp index 2405992..f5d6d30 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -1075,7 +1075,7 @@ decrypt(const std::string &ciphertext, } - crypto::chacha8(ciphertext.data() + sizeof(iv), + crypto::chacha20(ciphertext.data() + sizeof(iv), ciphertext.size() - prefix_size, key, iv, &plaintext[0]);