mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
verifiction of output data decryption added
This commit is contained in:
parent
7c099e5053
commit
a7ef6506a0
4 changed files with 17 additions and 5 deletions
14
src/page.h
14
src/page.h
|
@ -2439,7 +2439,6 @@ public:
|
|||
|
||||
const size_t magiclen = strlen(OUTPUT_EXPORT_FILE_MAGIC);
|
||||
|
||||
|
||||
if (!strncmp(decoded_raw_data.c_str(), OUTPUT_EXPORT_FILE_MAGIC, magiclen) == 0)
|
||||
{
|
||||
string error_msg = fmt::format("This does not seem to be output keys export data.");
|
||||
|
@ -2450,12 +2449,25 @@ public:
|
|||
return mstch::render(full_page, context);
|
||||
}
|
||||
|
||||
|
||||
// decrypt key images data using private view key
|
||||
decoded_raw_data = xmreg::decrypt(
|
||||
std::string(decoded_raw_data, magiclen),
|
||||
prv_view_key, true);
|
||||
|
||||
|
||||
if (decoded_raw_data.empty())
|
||||
{
|
||||
string error_msg = fmt::format("Failed to authenticate outputs data. "
|
||||
"Maybe wrong viewkey was porvided?");
|
||||
|
||||
context["has_error"] = true;
|
||||
context["error_msg"] = error_msg;
|
||||
|
||||
return mstch::render(full_page, context);
|
||||
}
|
||||
|
||||
|
||||
// header is public spend and keys
|
||||
const size_t header_lenght = 2 * sizeof(crypto::public_key);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<form action="/checkrawkeyimgs" method="post" style="width:100%; margin-top:15px" class="style-1">
|
||||
Paste base64 encoded, signed key images data here<br/>
|
||||
(In Linux, can get base64 signed raw tx data: <i>base64 your_key_images_file | xclip -selection clipboard</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f your_key_images_file encoded.txt; type "encoded.txt" | clip</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f your_key_images_file encoded.txt & type "encoded.txt" | clip</i>)<br/>
|
||||
<textarea name="rawkeyimgsdata" rows="20" cols="80"></textarea><br/><br/>
|
||||
Viewkey (<i>key image file data is encoded using your viewkey. Thus is needed for decryption</i>)
|
||||
<br/>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<form action="/checkrawoutputkeys" method="post" style="width:100%; margin-top:15px" class="style-1">
|
||||
Paste base64 encoded, signed output keys data here<br/>
|
||||
(In Linux, can get base64 signed raw tx data: <i>base64 your_output_keys_filename | xclip -selection clipboard</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f your_output_keys_filename encoded.txt; type "encoded.txt" | clip</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f your_output_keys_filename encoded.txt & type "encoded.txt" | clip</i>)<br/>
|
||||
<textarea name="rawoutputkeysdata" rows="20" cols="80"></textarea><br/><br/>
|
||||
Viewkey (<i>output keys file data is encoded using your viewkey. Thus is needed for decryption</i>)
|
||||
<br/>
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
<div class="center">
|
||||
<form action="/checkandpush" method="post" style="width:100%; margin-top:15px" class="style-1">
|
||||
Paste base64 encoded, signed transaction data here<br/>
|
||||
Paste base64 encoded, unsigned or signed transaction data here<br/>
|
||||
(In Linux, can get base64 signed raw tx data: <i>base64 signed_monero_tx | xclip -selection clipboard</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f signed_monero_tx encoded.txt; type "encoded.txt" | clip</i>)<br/>
|
||||
(In Windows, can get base64 signed raw tx data: <i>certutil.exe -encode -f signed_monero_tx encoded.txt & type "encoded.txt" | clip</i>)<br/>
|
||||
<textarea name="rawtxdata" rows="20" cols="80"></textarea>
|
||||
<br/>
|
||||
<input type="submit" name="action" value="check">
|
||||
|
|
Loading…
Reference in a new issue