From a11fbb2928686af980ca57c4f67dfebe06c9203e Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Thu, 22 Aug 2019 21:45:11 +0300 Subject: [PATCH] Enforce upper case for hashes/signatures string output (#2235) --- nano/lib/numbers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nano/lib/numbers.cpp b/nano/lib/numbers.cpp index 12d5b056..a8f36ba8 100644 --- a/nano/lib/numbers.cpp +++ b/nano/lib/numbers.cpp @@ -202,7 +202,7 @@ void nano::uint256_union::encode_hex (std::string & text) const { assert (text.empty ()); std::stringstream stream; - stream << std::hex << std::noshowbase << std::setw (64) << std::setfill ('0'); + stream << std::hex << std::uppercase << std::noshowbase << std::setw (64) << std::setfill ('0'); stream << number (); text = stream.str (); } @@ -319,7 +319,7 @@ void nano::uint512_union::encode_hex (std::string & text) const { assert (text.empty ()); std::stringstream stream; - stream << std::hex << std::noshowbase << std::setw (128) << std::setfill ('0'); + stream << std::hex << std::uppercase << std::noshowbase << std::setw (128) << std::setfill ('0'); stream << number (); text = stream.str (); } @@ -476,7 +476,7 @@ void nano::uint128_union::encode_hex (std::string & text) const { assert (text.empty ()); std::stringstream stream; - stream << std::hex << std::noshowbase << std::setw (32) << std::setfill ('0'); + stream << std::hex << std::uppercase << std::noshowbase << std::setw (32) << std::setfill ('0'); stream << number (); text = stream.str (); }