Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
5cabcf96
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5cabcf96
编写于
12月 29, 2008
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix "possible loss of data" Win64 compiler warnings.
上级
85e878f2
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
54 addition
and
51 deletion
+54
-51
crypto/bn/bn_lib.c
crypto/bn/bn_lib.c
+1
-1
crypto/bn/bn_nist.c
crypto/bn/bn_nist.c
+31
-31
crypto/dso/dso_win32.c
crypto/dso/dso_win32.c
+9
-9
crypto/evp/e_des.c
crypto/evp/e_des.c
+2
-1
crypto/evp/e_des3.c
crypto/evp/e_des3.c
+2
-1
crypto/md32_common.h
crypto/md32_common.h
+2
-2
crypto/modes/cfb128.c
crypto/modes/cfb128.c
+2
-1
crypto/rc4/rc4_enc.c
crypto/rc4/rc4_enc.c
+2
-2
crypto/sha/sha512.c
crypto/sha/sha512.c
+1
-1
crypto/whrlpool/wp_dgst.c
crypto/whrlpool/wp_dgst.c
+2
-2
未找到文件。
crypto/bn/bn_lib.c
浏览文件 @
5cabcf96
...
...
@@ -763,7 +763,7 @@ int BN_is_bit_set(const BIGNUM *a, int n)
i
=
n
/
BN_BITS2
;
j
=
n
%
BN_BITS2
;
if
(
a
->
top
<=
i
)
return
0
;
return
(((
a
->
d
[
i
])
>>
j
)
&
((
BN_ULONG
)
1
));
return
(((
a
->
d
[
i
])
>>
j
)
&
((
BN_ULONG
)
1
)
==
1
);
}
int
BN_mask_bits
(
BIGNUM
*
a
,
int
n
)
...
...
crypto/bn/bn_nist.c
浏览文件 @
5cabcf96
...
...
@@ -388,14 +388,14 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
nist_cp_bn_0
(
buf
,
a_d
+
BN_NIST_192_TOP
,
top
-
BN_NIST_192_TOP
,
BN_NIST_192_TOP
);
nist_set_192
(
t_d
,
buf
,
0
,
3
,
3
);
carry
=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
carry
=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
nist_set_192
(
t_d
,
buf
,
4
,
4
,
0
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
nist_set_192
(
t_d
,
buf
,
5
,
5
,
5
)
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_192_TOP
);
if
(
carry
>
0
)
carry
=
bn_sub_words
(
r_d
,
r_d
,
_nist_p_192
[
carry
-
1
],
BN_NIST_192_TOP
);
carry
=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
_nist_p_192
[
carry
-
1
],
BN_NIST_192_TOP
);
else
carry
=
1
;
...
...
@@ -482,13 +482,13 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
nist_cp_bn_0
(
buf
,
a_d
+
BN_NIST_224_TOP
,
top
-
BN_NIST_224_TOP
,
BN_NIST_224_TOP
);
#endif
nist_set_224
(
t_d
,
buf
,
10
,
9
,
8
,
7
,
0
,
0
,
0
);
carry
=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
carry
=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
nist_set_224
(
t_d
,
buf
,
0
,
13
,
12
,
11
,
0
,
0
,
0
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
nist_set_224
(
t_d
,
buf
,
13
,
12
,
11
,
10
,
9
,
8
,
7
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
nist_set_224
(
t_d
,
buf
,
0
,
0
,
0
,
0
,
13
,
12
,
11
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_224_TOP
);
#if BN_BITS2==64
carry
=
(
int
)(
r_d
[
BN_NIST_224_TOP
-
1
]
>>
32
);
...
...
@@ -496,7 +496,7 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
u
.
f
=
bn_sub_words
;
if
(
carry
>
0
)
{
carry
=
bn_sub_words
(
r_d
,
r_d
,
_nist_p_224
[
carry
-
1
],
BN_NIST_224_TOP
);
carry
=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
_nist_p_224
[
carry
-
1
],
BN_NIST_224_TOP
);
#if BN_BITS2==64
carry
=
(
int
)(
~
(
r_d
[
BN_NIST_224_TOP
-
1
]
>>
32
))
&
1
;
#endif
...
...
@@ -509,7 +509,7 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
* the modulus. but if it does, then result has
* to be compared to the modulus and conditionally
* adjusted by *subtracting* the latter. */
carry
=
bn_add_words
(
r_d
,
r_d
,
_nist_p_224
[
-
carry
-
1
],
BN_NIST_224_TOP
);
carry
=
(
int
)
bn_add_words
(
r_d
,
r_d
,
_nist_p_224
[
-
carry
-
1
],
BN_NIST_224_TOP
);
mask
=
0
-
(
size_t
)
carry
;
u
.
p
=
((
size_t
)
bn_sub_words
&
mask
)
|
((
size_t
)
bn_add_words
&~
mask
);
}
...
...
@@ -587,7 +587,7 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
nist_set_256
(
t_d
,
buf
,
15
,
14
,
13
,
12
,
11
,
0
,
0
,
0
);
/*S2*/
nist_set_256
(
c_d
,
buf
,
0
,
15
,
14
,
13
,
12
,
0
,
0
,
0
);
carry
=
bn_add_words
(
t_d
,
t_d
,
c_d
,
BN_NIST_256_TOP
);
carry
=
(
int
)
bn_add_words
(
t_d
,
t_d
,
c_d
,
BN_NIST_256_TOP
);
/* left shift */
{
register
BN_ULONG
*
ap
,
t
,
c
;
...
...
@@ -602,33 +602,33 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
carry
<<=
1
;
carry
|=
c
;
}
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*S3*/
nist_set_256
(
t_d
,
buf
,
15
,
14
,
0
,
0
,
0
,
10
,
9
,
8
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*S4*/
nist_set_256
(
t_d
,
buf
,
8
,
13
,
15
,
14
,
13
,
11
,
10
,
9
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*D1*/
nist_set_256
(
t_d
,
buf
,
10
,
8
,
0
,
0
,
0
,
13
,
12
,
11
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*D2*/
nist_set_256
(
t_d
,
buf
,
11
,
9
,
0
,
0
,
15
,
14
,
13
,
12
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*D3*/
nist_set_256
(
t_d
,
buf
,
12
,
0
,
10
,
9
,
8
,
15
,
14
,
13
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/*D4*/
nist_set_256
(
t_d
,
buf
,
13
,
0
,
11
,
10
,
9
,
0
,
15
,
14
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_256_TOP
);
/* see BN_nist_mod_224 for explanation */
u
.
f
=
bn_sub_words
;
if
(
carry
>
0
)
carry
=
bn_sub_words
(
r_d
,
r_d
,
_nist_p_256
[
carry
-
1
],
BN_NIST_256_TOP
);
carry
=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
_nist_p_256
[
carry
-
1
],
BN_NIST_256_TOP
);
else
if
(
carry
<
0
)
{
carry
=
bn_add_words
(
r_d
,
r_d
,
_nist_p_256
[
-
carry
-
1
],
BN_NIST_256_TOP
);
carry
=
(
int
)
bn_add_words
(
r_d
,
r_d
,
_nist_p_256
[
-
carry
-
1
],
BN_NIST_256_TOP
);
mask
=
0
-
(
size_t
)
carry
;
u
.
p
=
((
size_t
)
bn_sub_words
&
mask
)
|
((
size_t
)
bn_add_words
&~
mask
);
}
...
...
@@ -721,39 +721,39 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
}
*
ap
=
c
;
}
carry
=
bn_add_words
(
r_d
+
(
128
/
BN_BITS2
),
r_d
+
(
128
/
BN_BITS2
),
carry
=
(
int
)
bn_add_words
(
r_d
+
(
128
/
BN_BITS2
),
r_d
+
(
128
/
BN_BITS2
),
t_d
,
BN_NIST_256_TOP
);
/*S2 */
carry
+=
bn_add_words
(
r_d
,
r_d
,
buf
,
BN_NIST_384_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
buf
,
BN_NIST_384_TOP
);
/*S3*/
nist_set_384
(
t_d
,
buf
,
20
,
19
,
18
,
17
,
16
,
15
,
14
,
13
,
12
,
23
,
22
,
21
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*S4*/
nist_set_384
(
t_d
,
buf
,
19
,
18
,
17
,
16
,
15
,
14
,
13
,
12
,
20
,
0
,
23
,
0
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*S5*/
nist_set_384
(
t_d
,
buf
,
0
,
0
,
0
,
0
,
23
,
22
,
21
,
20
,
0
,
0
,
0
,
0
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*S6*/
nist_set_384
(
t_d
,
buf
,
0
,
0
,
0
,
0
,
0
,
0
,
23
,
22
,
21
,
0
,
0
,
20
);
carry
+=
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
+=
(
int
)
bn_add_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*D1*/
nist_set_384
(
t_d
,
buf
,
22
,
21
,
20
,
19
,
18
,
17
,
16
,
15
,
14
,
13
,
12
,
23
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*D2*/
nist_set_384
(
t_d
,
buf
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
23
,
22
,
21
,
20
,
0
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/*D3*/
nist_set_384
(
t_d
,
buf
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
23
,
23
,
0
,
0
,
0
);
carry
-=
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
carry
-=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
t_d
,
BN_NIST_384_TOP
);
/* see BN_nist_mod_224 for explanation */
u
.
f
=
bn_sub_words
;
if
(
carry
>
0
)
carry
=
bn_sub_words
(
r_d
,
r_d
,
_nist_p_384
[
carry
-
1
],
BN_NIST_384_TOP
);
carry
=
(
int
)
bn_sub_words
(
r_d
,
r_d
,
_nist_p_384
[
carry
-
1
],
BN_NIST_384_TOP
);
else
if
(
carry
<
0
)
{
carry
=
bn_add_words
(
r_d
,
r_d
,
_nist_p_384
[
-
carry
-
1
],
BN_NIST_384_TOP
);
carry
=
(
int
)
bn_add_words
(
r_d
,
r_d
,
_nist_p_384
[
-
carry
-
1
],
BN_NIST_384_TOP
);
mask
=
0
-
(
size_t
)
carry
;
u
.
p
=
((
size_t
)
bn_sub_words
&
mask
)
|
((
size_t
)
bn_add_words
&~
mask
);
}
...
...
crypto/dso/dso_win32.c
浏览文件 @
5cabcf96
...
...
@@ -358,7 +358,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
return
(
NULL
);
}
result
->
device
=
start
;
result
->
devicelen
=
filename
-
start
;
result
->
devicelen
=
(
int
)(
filename
-
start
)
;
position
=
IN_FILE
;
start
=
++
filename
;
result
->
dir
=
start
;
...
...
@@ -367,7 +367,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
case
'/'
:
if
(
position
==
IN_NODE
)
{
result
->
nodelen
=
filename
-
start
;
result
->
nodelen
=
(
int
)(
filename
-
start
)
;
position
=
IN_FILE
;
start
=
++
filename
;
result
->
dir
=
start
;
...
...
@@ -377,20 +377,20 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
position
=
IN_FILE
;
filename
++
;
result
->
dir
=
start
;
result
->
dirlen
=
filename
-
start
;
result
->
dirlen
=
(
int
)(
filename
-
start
)
;
start
=
filename
;
}
else
{
filename
++
;
result
->
dirlen
+=
filename
-
start
;
result
->
dirlen
+=
(
int
)(
filename
-
start
)
;
start
=
filename
;
}
break
;
case
'\0'
:
if
(
position
==
IN_NODE
)
{
result
->
nodelen
=
filename
-
start
;
result
->
nodelen
=
(
int
)(
filename
-
start
)
;
}
else
{
...
...
@@ -404,13 +404,13 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
result
->
dirlen
=
0
;
}
result
->
dirlen
+=
filename
-
start
;
(
int
)(
filename
-
start
)
;
}
else
{
result
->
file
=
start
;
result
->
filelen
=
filename
-
start
;
(
int
)(
filename
-
start
)
;
}
}
}
...
...
@@ -504,7 +504,7 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
+
file_split
->
predirlen
-
(
start
-
file_split
->
predir
);
strncpy
(
&
result
[
offset
],
start
,
end
-
start
);
offset
+=
end
-
start
;
end
-
start
);
offset
+=
(
int
)(
end
-
start
)
;
result
[
offset
]
=
'\\'
;
offset
++
;
start
=
end
+
1
;
}
...
...
@@ -525,7 +525,7 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
+
file_split
->
dirlen
-
(
start
-
file_split
->
dir
);
strncpy
(
&
result
[
offset
],
start
,
end
-
start
);
offset
+=
end
-
start
;
end
-
start
);
offset
+=
(
int
)(
end
-
start
)
;
result
[
offset
]
=
'\\'
;
offset
++
;
start
=
end
+
1
;
}
...
...
crypto/evp/e_des.c
浏览文件 @
5cabcf96
...
...
@@ -147,7 +147,8 @@ static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
c
[
0
]
=
(
in
[
n
/
8
]
&
(
1
<<
(
7
-
n
%
8
)))
?
0x80
:
0
;
DES_cfb_encrypt
(
c
,
d
,
1
,
1
,
ctx
->
cipher_data
,(
DES_cblock
*
)
ctx
->
iv
,
ctx
->
encrypt
);
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
0x80
>>
(
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
n
%
8
));
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
0x80
>>
(
unsigned
int
)(
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
unsigned
int
)(
n
%
8
));
}
inl
-=
chunk
;
in
+=
chunk
;
...
...
crypto/evp/e_des3.c
浏览文件 @
5cabcf96
...
...
@@ -179,7 +179,8 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
DES_ede3_cfb_encrypt
(
c
,
d
,
1
,
1
,
&
data
(
ctx
)
->
ks1
,
&
data
(
ctx
)
->
ks2
,
&
data
(
ctx
)
->
ks3
,
(
DES_cblock
*
)
ctx
->
iv
,
ctx
->
encrypt
);
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
0x80
>>
(
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
n
%
8
));
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
0x80
>>
(
unsigned
int
)(
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
unsigned
int
)(
n
%
8
));
}
return
1
;
...
...
crypto/md32_common.h
浏览文件 @
5cabcf96
...
...
@@ -293,7 +293,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len)
* Wei Dai <weidai@eskimo.com> for pointing it out. */
if
(
l
<
c
->
Nl
)
/* overflow */
c
->
Nh
++
;
c
->
Nh
+=
(
len
>>
29
);
/* might cause compiler warning on 16-bit */
c
->
Nh
+=
(
HASH_LONG
)(
len
>>
29
);
/* might cause compiler warning on 16-bit */
c
->
Nl
=
l
;
n
=
c
->
num
;
...
...
@@ -331,7 +331,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len)
if
(
len
!=
0
)
{
p
=
(
unsigned
char
*
)
c
->
data
;
c
->
num
=
len
;
c
->
num
=
(
unsigned
int
)
len
;
memcpy
(
p
,
data
,
len
);
}
return
1
;
...
...
crypto/modes/cfb128.c
浏览文件 @
5cabcf96
...
...
@@ -229,7 +229,8 @@ void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,
{
c
[
0
]
=
(
in
[
n
/
8
]
&
(
1
<<
(
7
-
n
%
8
)))
?
0x80
:
0
;
cfbr_encrypt_block
(
c
,
d
,
1
,
key
,
ivec
,
enc
,
block
);
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
1
<<
(
7
-
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
n
%
8
));
out
[
n
/
8
]
=
(
out
[
n
/
8
]
&~
(
1
<<
(
unsigned
int
)(
7
-
n
%
8
)))
|
((
d
[
0
]
&
0x80
)
>>
(
unsigned
int
)(
n
%
8
));
}
}
...
...
crypto/rc4/rc4_enc.c
浏览文件 @
5cabcf96
...
...
@@ -157,7 +157,7 @@ void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
if
(
!
is_endian
.
little
)
{
/* BIG-ENDIAN CASE */
# define BESHFT(c) (((sizeof(RC4_CHUNK)-(c)-1)*8)&(sizeof(RC4_CHUNK)*8-1))
for
(;
len
&
-
sizeof
(
RC4_CHUNK
);
len
-=
sizeof
(
RC4_CHUNK
))
for
(;
len
&
(
0
-
sizeof
(
RC4_CHUNK
)
);
len
-=
sizeof
(
RC4_CHUNK
))
{
ichunk
=
*
(
RC4_CHUNK
*
)
indata
;
otp
=
RC4_STEP
<<
BESHFT
(
0
);
...
...
@@ -210,7 +210,7 @@ void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
else
{
/* LITTLE-ENDIAN CASE */
# define LESHFT(c) (((c)*8)&(sizeof(RC4_CHUNK)*8-1))
for
(;
len
&
-
sizeof
(
RC4_CHUNK
);
len
-=
sizeof
(
RC4_CHUNK
))
for
(;
len
&
(
0
-
sizeof
(
RC4_CHUNK
)
);
len
-=
sizeof
(
RC4_CHUNK
))
{
ichunk
=
*
(
RC4_CHUNK
*
)
indata
;
otp
=
RC4_STEP
;
...
...
crypto/sha/sha512.c
浏览文件 @
5cabcf96
...
...
@@ -240,7 +240,7 @@ int SHA512_Update (SHA512_CTX *c, const void *_data, size_t len)
if
(
len
<
n
)
{
memcpy
(
p
+
c
->
num
,
data
,
len
),
c
->
num
+=
len
;
memcpy
(
p
+
c
->
num
,
data
,
len
),
c
->
num
+=
(
unsigned
int
)
len
;
return
1
;
}
else
{
...
...
crypto/whrlpool/wp_dgst.c
浏览文件 @
5cabcf96
...
...
@@ -130,7 +130,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *_inp,size_t bits)
else
{
memcpy
(
c
->
data
+
byteoff
,
inp
,
bits
/
8
);
bitoff
+=
bits
;
bitoff
+=
(
unsigned
int
)
bits
;
bits
=
0
;
}
c
->
bitoff
=
bitoff
;
...
...
@@ -197,7 +197,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *_inp,size_t bits)
b
=
(
inp
[
0
]
<<
inpgap
)
&
0xff
;
if
(
bitrem
)
c
->
data
[
byteoff
++
]
|=
b
>>
bitrem
;
else
c
->
data
[
byteoff
++
]
=
b
;
bitoff
+=
bits
;
bitoff
+=
(
unsigned
int
)
bits
;
if
(
bitoff
==
WHIRLPOOL_BBLOCK
)
{
whirlpool_block
(
c
,
c
->
data
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录