summaryrefslogtreecommitdiff
path: root/src/utils/sha256.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/sha256.cpp')
-rw-r--r--src/utils/sha256.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp
index a97dce3c..a18e5f18 100644
--- a/src/utils/sha256.cpp
+++ b/src/utils/sha256.cpp
@@ -265,10 +265,10 @@ std::string SHA256Hash(const char *src, int len)
// Convert it to hex
const char* hxc = "0123456789abcdef";
std::string hash = "";
- for (int i = 0; i < SHA256_DIGEST_SIZE; i++)
+ for (unsigned char i : bytehash)
{
- hash += hxc[bytehash[i] / 16];
- hash += hxc[bytehash[i] % 16];
+ hash += hxc[i / 16];
+ hash += hxc[i % 16];
}
return hash;
}