diff options
author | unril <unril@yandex-team.ru> | 2022-02-10 16:46:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:05 +0300 |
commit | 11ae9eca250d0188b7962459cbc6706719e7dca9 (patch) | |
tree | 4b7d6755091980d33210de19b2eb35a401a761ea /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp | |
parent | 9c914f41ba5e9f9365f404e892197553ac23809e (diff) | |
download | ydb-11ae9eca250d0188b7962459cbc6706719e7dca9.tar.gz |
Restoring authorship annotation for <unril@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp')
-rw-r--r-- | contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp index 147bddf33e..ed4f3bf765 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/HashingUtils.cpp @@ -5,7 +5,7 @@ #include <aws/core/utils/logging/LogMacros.h> #include <aws/core/utils/HashingUtils.h> -#include <aws/core/utils/StringUtils.h> +#include <aws/core/utils/StringUtils.h> #include <aws/core/utils/base64/Base64.h> #include <aws/core/utils/crypto/Sha256.h> #include <aws/core/utils/crypto/Sha256HMAC.h> @@ -139,16 +139,16 @@ ByteBuffer HashingUtils::CalculateSHA256TreeHash(Aws::IOStream& stream) Aws::String HashingUtils::HexEncode(const ByteBuffer& message) { - Aws::String encoded; - encoded.reserve(2 * message.GetLength()); + Aws::String encoded; + encoded.reserve(2 * message.GetLength()); for (unsigned i = 0; i < message.GetLength(); ++i) { - encoded.push_back("0123456789abcdef"[message[i] >> 4]); - encoded.push_back("0123456789abcdef"[message[i] & 0x0f]); + encoded.push_back("0123456789abcdef"[message[i] >> 4]); + encoded.push_back("0123456789abcdef"[message[i] & 0x0f]); } - return encoded; + return encoded; } ByteBuffer HashingUtils::HexDecode(const Aws::String& str) @@ -176,7 +176,7 @@ ByteBuffer HashingUtils::HexDecode(const Aws::String& str) for (size_t i = readIndex; i < str.length(); i += 2) { - if(!StringUtils::IsAlnum(str[i]) || !StringUtils::IsAlnum(str[i + 1])) + if(!StringUtils::IsAlnum(str[i]) || !StringUtils::IsAlnum(str[i + 1])) { //contains non-hex characters assert(0); @@ -226,7 +226,7 @@ int HashingUtils::HashString(const char* strToHash) if (!strToHash) return 0; - unsigned hash = 0; + unsigned hash = 0; while (char charValue = *strToHash++) { hash = charValue + 31 * hash; |