Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cd7f69a7
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cd7f69a7
编写于
3月 28, 2022
作者:
W
wade zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TS-1368: Rename MD5 related names which conflict with names in system library
上级
82ef486d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+6
-6
src/util/inc/tmd5.h
src/util/inc/tmd5.h
+4
-4
src/util/src/tmd5.c
src/util/src/tmd5.c
+6
-6
未找到文件。
src/rpc/src/rpcMain.c
浏览文件 @
cd7f69a7
...
...
@@ -1556,13 +1556,13 @@ static int rpcAuthenticateMsg(void *pMsg, int msgLen, void *pAuth, void *pKey) {
}
static
void
rpcBuildAuthHead
(
void
*
pMsg
,
int
msgLen
,
void
*
pAuth
,
void
*
pKey
)
{
MD5_CTX
context
;
TAOS_
MD5_CTX
context
;
MD5Init
(
&
context
);
MD5Update
(
&
context
,
(
uint8_t
*
)
pKey
,
TSDB_KEY_LEN
);
MD5Update
(
&
context
,
(
uint8_t
*
)
pMsg
,
msgLen
);
MD5Update
(
&
context
,
(
uint8_t
*
)
pKey
,
TSDB_KEY_LEN
);
MD5Final
(
&
context
);
taos_
MD5Init
(
&
context
);
taos_
MD5Update
(
&
context
,
(
uint8_t
*
)
pKey
,
TSDB_KEY_LEN
);
taos_
MD5Update
(
&
context
,
(
uint8_t
*
)
pMsg
,
msgLen
);
taos_
MD5Update
(
&
context
,
(
uint8_t
*
)
pKey
,
TSDB_KEY_LEN
);
taos_
MD5Final
(
&
context
);
memcpy
(
pAuth
,
context
.
digest
,
sizeof
(
context
.
digest
));
}
...
...
src/util/inc/tmd5.h
浏览文件 @
cd7f69a7
...
...
@@ -31,11 +31,11 @@ typedef struct {
uint32_t
i
[
2
];
/* number of _bits_ handled mod 2^64 */
uint32_t
buf
[
4
];
/* scratch buffer */
uint8_t
in
[
64
];
/* input buffer */
uint8_t
digest
[
16
];
/* actual digest after MD5Final call */
uint8_t
digest
[
16
];
/* actual digest after
taos_
MD5Final call */
}
TAOS_MD5_CTX
;
void
taos_MD5Init
(
MD5_CTX
*
mdContext
);
void
taos_MD5Update
(
MD5_CTX
*
mdContext
,
uint8_t
*
inBuf
,
unsigned
int
inLen
);
void
taos_MD5Final
(
MD5_CTX
*
mdContext
);
void
taos_MD5Init
(
TAOS_
MD5_CTX
*
mdContext
);
void
taos_MD5Update
(
TAOS_
MD5_CTX
*
mdContext
,
uint8_t
*
inBuf
,
unsigned
int
inLen
);
void
taos_MD5Final
(
TAOS_
MD5_CTX
*
mdContext
);
#endif
src/util/src/tmd5.c
浏览文件 @
cd7f69a7
...
...
@@ -2,9 +2,9 @@
***********************************************************************
** Message-digest routines: **
** To form the message digest for a message M **
** (1) Initialize a context buffer mdContext using MD5Init **
** (2) Call MD5Update on mdContext and M **
** (3) Call MD5Final on mdContext **
** (1) Initialize a context buffer mdContext using
taos_
MD5Init **
** (2) Call
taos_
MD5Update on mdContext and M **
** (3) Call
taos_
MD5Final on mdContext **
** The message digest is now in mdContext->digest[0...15] **
***********************************************************************
*/
...
...
@@ -82,7 +82,7 @@ static uint8_t PADDING[64] = {0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x
(a) += (b); \
}
/* The routine MD5Init initializes the message-digest context
/* The routine
taos_
MD5Init initializes the message-digest context
mdContext. All fields are set to zero.
*/
void
taos_MD5Init
(
TAOS_MD5_CTX
*
mdContext
)
{
...
...
@@ -95,7 +95,7 @@ void taos_MD5Init(TAOS_MD5_CTX *mdContext) {
mdContext
->
buf
[
3
]
=
(
uint32_t
)
0x10325476
;
}
/* The routine MD5Update updates the message-digest context to
/* The routine
taos_
MD5Update updates the message-digest context to
account for the presence of each of the characters inBuf[0..inLen-1]
in the message whose digest is being computed.
*/
...
...
@@ -127,7 +127,7 @@ void taos_MD5Update(TAOS_MD5_CTX *mdContext, uint8_t *inBuf, unsigned int inLen)
}
}
/* The routine MD5Final terminates the message-digest computation and
/* The routine
taos_
MD5Final terminates the message-digest computation and
ends with the desired message digest in mdContext->digest[0...15].
*/
void
taos_MD5Final
(
TAOS_MD5_CTX
*
mdContext
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录