From bea2bb074d562b8d04c1ae5e994f8babd0a56b5b Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Fri, 29 Sep 2017 07:27:36 +0800 Subject: [PATCH] dont show full private viewkey when decoding output --- src/page.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/page.h b/src/page.h index 1758776..ab3bfa8 100644 --- a/src/page.h +++ b/src/page.h @@ -1605,13 +1605,20 @@ namespace xmreg + "/" + xmr_address_str + "/" + viewkey_str; + + string viewkey_str_partial = viewkey_str; + + // dont show full private keys. Only file first and last letters + for (size_t i = 3; i < viewkey_str_partial.length() - 2; ++i) + viewkey_str_partial[i] = '*'; + // initalise page tempate map with basic info about blockchain mstch::map context { {"testnet" , testnet}, {"tx_hash" , tx_hash_str}, {"tx_prefix_hash" , pod_to_hex(txd.prefix_hash)}, {"xmr_address" , xmr_address_str}, - {"viewkey" , viewkey_str}, + {"viewkey" , viewkey_str_partial}, {"tx_pub_key" , pod_to_hex(txd.pk)}, {"blk_height" , tx_blk_height_str}, {"tx_size" , fmt::format("{:0.4f}",