Output digest[i] as an integer, rather than a character, in sha1.hpp

This commit is contained in:
Peter Dimov
2024-08-22 10:21:19 +03:00
parent c539c92dd6
commit f8e5e35437
+1 -1
View File
@@ -48,7 +48,7 @@ class sha1 {
std::ostringstream buf;
#if BOOST_VERSION >= 108600
for(int i = 0; i < 20; ++i)
buf << std::hex << std::setfill('0') << std::setw(2) << digest[i];
buf << std::hex << std::setfill('0') << std::setw(2) << +digest[i];
#else
for(int i = 0; i < 5; ++i)
buf << std::hex << std::setfill('0') << std::setw(8) << digest[i];