Unverified 提交 dac45706 authored 作者: Philipp Hancke's avatar Philipp Hancke 提交者: GitHub

fix typos (#610)

vrypto->crypto
GetHmacShA1->GetHmacShA1
上级 c424d3d5
......@@ -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;
......
......@@ -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;
......@@ -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);
......
......@@ -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)));
......@@ -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();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论