Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d70e2507
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d70e2507
编写于
7月 25, 2004
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Some compilers are just too whiny. Nothing makes Microsoft compiler
stop complaining about loss of precision, but explicit cast.
上级
2fcf435d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
24 deletion
+32
-24
crypto/sha/sha512.c
crypto/sha/sha512.c
+32
-24
未找到文件。
crypto/sha/sha512.c
浏览文件 @
d70e2507
...
...
@@ -104,22 +104,22 @@ int SHA512_Final (unsigned char *md, SHA512_CTX *c)
c
->
u
.
d
[
SHA_LBLOCK
-
2
]
=
c
->
Nh
;
c
->
u
.
d
[
SHA_LBLOCK
-
1
]
=
c
->
Nl
;
#else
p
[
sizeof
(
c
->
u
)
-
1
]
=
(
c
->
Nl
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
2
]
=
(
c
->
Nl
>>
8
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
3
]
=
(
c
->
Nl
>>
16
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
4
]
=
(
c
->
Nl
>>
24
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
5
]
=
(
c
->
Nl
>>
32
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
6
]
=
(
c
->
Nl
>>
40
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
7
]
=
(
c
->
Nl
>>
48
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
8
]
=
(
c
->
Nl
>>
56
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
9
]
=
(
c
->
Nh
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
10
]
=
(
c
->
Nh
>>
8
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
11
]
=
(
c
->
Nh
>>
16
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
12
]
=
(
c
->
Nh
>>
24
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
13
]
=
(
c
->
Nh
>>
32
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
14
]
=
(
c
->
Nh
>>
40
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
15
]
=
(
c
->
Nh
>>
48
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
16
]
=
(
c
->
Nh
>>
56
)
&
0xFF
;
p
[
sizeof
(
c
->
u
)
-
1
]
=
(
unsigned
char
)(
c
->
Nl
)
;
p
[
sizeof
(
c
->
u
)
-
2
]
=
(
unsigned
char
)(
c
->
Nl
>>
8
)
;
p
[
sizeof
(
c
->
u
)
-
3
]
=
(
unsigned
char
)(
c
->
Nl
>>
16
)
;
p
[
sizeof
(
c
->
u
)
-
4
]
=
(
unsigned
char
)(
c
->
Nl
>>
24
)
;
p
[
sizeof
(
c
->
u
)
-
5
]
=
(
unsigned
char
)(
c
->
Nl
>>
32
)
;
p
[
sizeof
(
c
->
u
)
-
6
]
=
(
unsigned
char
)(
c
->
Nl
>>
40
)
;
p
[
sizeof
(
c
->
u
)
-
7
]
=
(
unsigned
char
)(
c
->
Nl
>>
48
)
;
p
[
sizeof
(
c
->
u
)
-
8
]
=
(
unsigned
char
)(
c
->
Nl
>>
56
)
;
p
[
sizeof
(
c
->
u
)
-
9
]
=
(
unsigned
char
)(
c
->
Nh
)
;
p
[
sizeof
(
c
->
u
)
-
10
]
=
(
unsigned
char
)(
c
->
Nh
>>
8
)
;
p
[
sizeof
(
c
->
u
)
-
11
]
=
(
unsigned
char
)(
c
->
Nh
>>
16
)
;
p
[
sizeof
(
c
->
u
)
-
12
]
=
(
unsigned
char
)(
c
->
Nh
>>
24
)
;
p
[
sizeof
(
c
->
u
)
-
13
]
=
(
unsigned
char
)(
c
->
Nh
>>
32
)
;
p
[
sizeof
(
c
->
u
)
-
14
]
=
(
unsigned
char
)(
c
->
Nh
>>
40
)
;
p
[
sizeof
(
c
->
u
)
-
15
]
=
(
unsigned
char
)(
c
->
Nh
>>
48
)
;
p
[
sizeof
(
c
->
u
)
-
16
]
=
(
unsigned
char
)(
c
->
Nh
>>
56
)
;
#endif
sha512_block
(
c
,
p
,
1
);
...
...
@@ -134,10 +134,14 @@ int SHA512_Final (unsigned char *md, SHA512_CTX *c)
{
SHA_LONG64
t
=
c
->
h
[
n
];
*
(
md
++
)
=
(
t
>>
56
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
48
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
40
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
32
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
24
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
16
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
8
)
&
0xFF
;
*
(
md
++
)
=
(
t
)
&
0xFF
;
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
56
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
48
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
40
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
32
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
24
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
16
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
8
);
*
(
md
++
)
=
(
unsigned
char
)(
t
);
}
break
;
case
SHA512_DIGEST_LENGTH
:
...
...
@@ -145,10 +149,14 @@ int SHA512_Final (unsigned char *md, SHA512_CTX *c)
{
SHA_LONG64
t
=
c
->
h
[
n
];
*
(
md
++
)
=
(
t
>>
56
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
48
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
40
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
32
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
24
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
16
)
&
0xFF
;
*
(
md
++
)
=
(
t
>>
8
)
&
0xFF
;
*
(
md
++
)
=
(
t
)
&
0xFF
;
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
56
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
48
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
40
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
32
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
24
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
16
);
*
(
md
++
)
=
(
unsigned
char
)(
t
>>
8
);
*
(
md
++
)
=
(
unsigned
char
)(
t
);
}
break
;
/* ... as well as make sure md_len is not abused. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录