Skip to content

Commit

Permalink
fix typos (versatica#610)
Browse files Browse the repository at this point in the history
vrypto->crypto
GetHmacShA1->GetHmacShA1
  • Loading branch information
fippo committed Jul 16, 2021
1 parent c424d3d commit dac4570
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion worker/include/Utils.hpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions worker/src/RTC/StunPacket.cpp
Expand Up @@ -444,7 +444,7 @@ namespace RTC
Utils::Byte::Set2Bytes(this->data, 2, static_cast<uint16_t>(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;
Expand Down Expand Up @@ -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<uint16_t>(Attribute::MESSAGE_INTEGRITY));
Utils::Byte::Set2Bytes(buffer, pos + 2, 20);
Expand Down
4 changes: 2 additions & 2 deletions worker/src/Utils/Crypto.cpp
Expand Up @@ -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<uint32_t>(reinterpret_cast<uintptr_t>(std::addressof(Crypto::seed)));

Expand All @@ -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();

Expand Down

0 comments on commit dac4570

Please sign in to comment.