From dac4570647d02c1b58982ca542f7d292db87ac45 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Fri, 16 Jul 2021 08:08:55 +0200 Subject: [PATCH] fix typos (#610) vrypto->crypto GetHmacShA1->GetHmacShA1 --- worker/include/Utils.hpp | 2 +- worker/src/RTC/StunPacket.cpp | 4 ++-- worker/src/Utils/Crypto.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worker/include/Utils.hpp b/worker/include/Utils.hpp index 9e8bb3d66d..0977dd7e27 100644 --- a/worker/include/Utils.hpp +++ b/worker/include/Utils.hpp @@ -251,7 +251,7 @@ namespace Utils return crc ^ ~0U; } - static const uint8_t* GetHmacShA1(const std::string& key, const uint8_t* data, size_t len); + static const uint8_t* GetHmacSha1(const std::string& key, const uint8_t* data, size_t len); private: thread_local static uint32_t seed; diff --git a/worker/src/RTC/StunPacket.cpp b/worker/src/RTC/StunPacket.cpp index 770c35f920..8b1d001d7f 100644 --- a/worker/src/RTC/StunPacket.cpp +++ b/worker/src/RTC/StunPacket.cpp @@ -444,7 +444,7 @@ namespace RTC Utils::Byte::Set2Bytes(this->data, 2, static_cast(this->size - 20 - 8)); // Calculate the HMAC-SHA1 of the message according to MESSAGE-INTEGRITY rules. - const uint8_t* computedMessageIntegrity = Utils::Crypto::GetHmacShA1( + const uint8_t* computedMessageIntegrity = Utils::Crypto::GetHmacSha1( localPassword, this->data, (this->messageIntegrity - 4) - this->data); Authentication result; @@ -747,7 +747,7 @@ namespace RTC // Calculate the HMAC-SHA1 of the packet according to MESSAGE-INTEGRITY rules. const uint8_t* computedMessageIntegrity = - Utils::Crypto::GetHmacShA1(this->password, buffer, pos); + Utils::Crypto::GetHmacSha1(this->password, buffer, pos); Utils::Byte::Set2Bytes(buffer, pos, static_cast(Attribute::MESSAGE_INTEGRITY)); Utils::Byte::Set2Bytes(buffer, pos + 2, 20); diff --git a/worker/src/Utils/Crypto.cpp b/worker/src/Utils/Crypto.cpp index 3fd608ae89..5152d3f730 100644 --- a/worker/src/Utils/Crypto.cpp +++ b/worker/src/Utils/Crypto.cpp @@ -56,7 +56,7 @@ namespace Utils { MS_TRACE(); - // Init the vrypto seed with a random number taken from the address + // Init the crypto seed with a random number taken from the address // of the seed variable itself (which is random). Crypto::seed = static_cast(reinterpret_cast(std::addressof(Crypto::seed))); @@ -72,7 +72,7 @@ namespace Utils HMAC_CTX_free(Crypto::hmacSha1Ctx); } - const uint8_t* Crypto::GetHmacShA1(const std::string& key, const uint8_t* data, size_t len) + const uint8_t* Crypto::GetHmacSha1(const std::string& key, const uint8_t* data, size_t len) { MS_TRACE();