diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch) | |
tree | 26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /ydb/library/http_proxy/authorization/signature.cpp | |
parent | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff) | |
download | ydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'ydb/library/http_proxy/authorization/signature.cpp')
-rw-r--r-- | ydb/library/http_proxy/authorization/signature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ydb/library/http_proxy/authorization/signature.cpp b/ydb/library/http_proxy/authorization/signature.cpp index 60368c0614..febd6ab93f 100644 --- a/ydb/library/http_proxy/authorization/signature.cpp +++ b/ydb/library/http_proxy/authorization/signature.cpp @@ -21,7 +21,7 @@ namespace NKikimr::NSQS { static TString HmacSHA256(TStringBuf key, TStringBuf data) { unsigned char hash[SHA256_DIGEST_LENGTH]; ui32 hl = SHA256_DIGEST_LENGTH; - const auto* res = HMAC(EVP_sha256(), key.data(), key.size(), reinterpret_cast<const unsigned char*>(data.data()), data.size(), hash, &hl); + const auto* res = HMAC(EVP_sha256(), key.data(), key.size(), reinterpret_cast<const unsigned char*>(data.data()), data.size(), hash, &hl); Y_ENSURE(res); Y_ENSURE(hl == SHA256_DIGEST_LENGTH); return TString{reinterpret_cast<const char*>(res), hl}; @@ -116,7 +116,7 @@ TString TAwsRequestSignV4::CalcSignature(const TString& secretKey) const { const auto signingKey = HmacSHA256(dateRegionServiceKey, AwsRequest_); const auto signatureHmac = HmacSHA256(signingKey, FinalStringToSignStr_); - return to_lower(HexEncode(signatureHmac.data(), signatureHmac.size())); + return to_lower(HexEncode(signatureHmac.data(), signatureHmac.size())); } void TAwsRequestSignV4::ParseAuthorization(const THttpInput& input) { |