From 84fab7e78a6ce323995240a1504d0315c6f229b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 May 2023 11:48:40 +0000 Subject: [PATCH] clang-format and clang-tidy fixes for de9c0b9c --- hashing/sha256.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hashing/sha256.cpp b/hashing/sha256.cpp index 3ce02446a..dddfbef2f 100644 --- a/hashing/sha256.cpp +++ b/hashing/sha256.cpp @@ -35,7 +35,7 @@ namespace sha256 { * @param input Input string * @return std::string The padded input string */ -std::string prepare_input(std::string input) { +std::string prepare_input(const std::string& input) { // Pre-processing std::string padded_input = input; uint64_t input_size = input.length() * 8; // Message length in bits @@ -69,7 +69,7 @@ uint32_t right_rotate(uint32_t n, size_t rotate) { * @param input The input string to hash * @return std::string The final hash value */ -std::string sha256(const std::string &input) { +std::string sha256(const std::string& input) { // Initialize array of hash values with first 32 bits of the fractional // parts of the square roots of the first 8 primes 2..19 std::array hash = {0x6A09E667, 0xBB67AE85, 0x3C6EF372, @@ -95,7 +95,7 @@ std::string sha256(const std::string &input) { // Process message in successive 512-bit (64-byte) chunks for (size_t i = 0; i < padded_input.length(); i += 64) { - std::array blocks; + std::array blocks{}; // Copy chunk into first 16 words of the message schedule array for (size_t j = 0; j < 16; ++j) {