Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
dac45706
Unverified
提交
dac45706
authored
7月 16, 2021
作者:
Philipp Hancke
提交者:
GitHub
7月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typos (#610)
vrypto->crypto GetHmacShA1->GetHmacShA1
上级
c424d3d5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
5 行增加
和
5 行删除
+5
-5
Utils.hpp
worker/include/Utils.hpp
+1
-1
StunPacket.cpp
worker/src/RTC/StunPacket.cpp
+2
-2
Crypto.cpp
worker/src/Utils/Crypto.cpp
+2
-2
没有找到文件。
worker/include/Utils.hpp
浏览文件 @
dac45706
...
...
@@ -251,7 +251,7 @@ namespace Utils
return
crc
^
~
0U
;
}
static
const
uint8_t
*
GetHmacSh
A
1
(
const
std
::
string
&
key
,
const
uint8_t
*
data
,
size_t
len
);
static
const
uint8_t
*
GetHmacSh
a
1
(
const
std
::
string
&
key
,
const
uint8_t
*
data
,
size_t
len
);
private
:
thread_local
static
uint32_t
seed
;
...
...
worker/src/RTC/StunPacket.cpp
浏览文件 @
dac45706
...
...
@@ -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
::
GetHmacSh
A
1
(
const
uint8_t
*
computedMessageIntegrity
=
Utils
::
Crypto
::
GetHmacSh
a
1
(
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
::
GetHmacSh
A
1
(
this
->
password
,
buffer
,
pos
);
Utils
::
Crypto
::
GetHmacSh
a
1
(
this
->
password
,
buffer
,
pos
);
Utils
::
Byte
::
Set2Bytes
(
buffer
,
pos
,
static_cast
<
uint16_t
>
(
Attribute
::
MESSAGE_INTEGRITY
));
Utils
::
Byte
::
Set2Bytes
(
buffer
,
pos
+
2
,
20
);
...
...
worker/src/Utils/Crypto.cpp
浏览文件 @
dac45706
...
...
@@ -56,7 +56,7 @@ namespace Utils
{
MS_TRACE
();
// Init the
v
rypto seed with a random number taken from the address
// Init the
c
rypto 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
::
GetHmacSh
A
1
(
const
std
::
string
&
key
,
const
uint8_t
*
data
,
size_t
len
)
const
uint8_t
*
Crypto
::
GetHmacSh
a
1
(
const
std
::
string
&
key
,
const
uint8_t
*
data
,
size_t
len
)
{
MS_TRACE
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论