Update hashing/sha256.cpp

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
Md. Anisul Haque
2023-05-24 02:33:22 +05:30
committed by GitHub
parent d8d65415d8
commit a1960b0fad

View File

@@ -198,11 +198,7 @@ std::string hash_to_string(const std::array<uint32_t, 8> &hash) {
* @return std::string The final hash value
*/
std::string sha256(const std::string &input) {
std::array<uint32_t, 8> hash = compute_hash(input);
std::string result = hash_to_string(hash);
return result;
return hash_to_string(compute_hash(input));
}
} // namespace sha256
} // namespace hashing