Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
006fcc22
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,发现更多精彩内容 >>
提交
006fcc22
编写于
3月 07, 2002
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change des_old.c to use types prefixed with _ossl_old_des_.
上级
709c51c4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
38 deletion
+38
-38
crypto/des/des_old.c
crypto/des/des_old.c
+38
-38
未找到文件。
crypto/des/des_old.c
浏览文件 @
006fcc22
...
...
@@ -80,7 +80,7 @@ const char *_ossl_old_des_options(void)
{
return
DES_options
();
}
void
_ossl_old_des_ecb3_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
void
_ossl_old_des_ecb3_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
des_key_schedule
ks1
,
des_key_schedule
ks2
,
des_key_schedule
ks3
,
int
enc
)
{
...
...
@@ -88,38 +88,38 @@ void _ossl_old_des_ecb3_encrypt(des_cblock *input,des_cblock *output,
(
DES_key_schedule
*
)
ks1
,
(
DES_key_schedule
*
)
ks2
,
(
DES_key_schedule
*
)
ks3
,
enc
);
}
DES_LONG
_ossl_old_des_cbc_cksum
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
)
DES_LONG
_ossl_old_des_cbc_cksum
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
)
{
return
DES_cbc_cksum
((
unsigned
char
*
)
input
,
output
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
);
}
void
_ossl_old_des_cbc_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
enc
)
void
_ossl_old_des_cbc_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
enc
)
{
DES_cbc_encrypt
((
unsigned
char
*
)
input
,
(
unsigned
char
*
)
output
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
enc
);
}
void
_ossl_old_des_ncbc_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
enc
)
void
_ossl_old_des_ncbc_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
enc
)
{
DES_ncbc_encrypt
((
unsigned
char
*
)
input
,
(
unsigned
char
*
)
output
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
enc
);
}
void
_ossl_old_des_xcbc_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
des_cblock
*
inw
,
des_cblock
*
outw
,
int
enc
)
void
_ossl_old_des_xcbc_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
_ossl_old_des_cblock
*
inw
,
_ossl_old_
des_cblock
*
outw
,
int
enc
)
{
DES_xcbc_encrypt
((
unsigned
char
*
)
input
,
(
unsigned
char
*
)
output
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
inw
,
outw
,
enc
);
}
void
_ossl_old_des_cfb_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
int
numbits
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
enc
)
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
enc
)
{
DES_cfb_encrypt
(
in
,
out
,
numbits
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
enc
);
}
void
_ossl_old_des_ecb_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
void
_ossl_old_des_ecb_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
des_key_schedule
ks
,
int
enc
)
{
DES_ecb_encrypt
(
input
,
output
,
(
DES_key_schedule
*
)
ks
,
enc
);
...
...
@@ -144,9 +144,9 @@ void _ossl_old_des_decrypt3(DES_LONG *data, des_key_schedule ks1,
DES_decrypt3
(
data
,
(
DES_key_schedule
*
)
ks1
,
(
DES_key_schedule
*
)
ks2
,
(
DES_key_schedule
*
)
ks3
);
}
void
_ossl_old_des_ede3_cbc_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
void
_ossl_old_des_ede3_cbc_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
ks1
,
des_key_schedule
ks2
,
des_key_schedule
ks3
,
des_cblock
*
ivec
,
int
enc
)
des_key_schedule
ks3
,
_ossl_old_
des_cblock
*
ivec
,
int
enc
)
{
DES_ede3_cbc_encrypt
((
unsigned
char
*
)
input
,
(
unsigned
char
*
)
output
,
length
,
(
DES_key_schedule
*
)
ks1
,
(
DES_key_schedule
*
)
ks2
,
...
...
@@ -154,7 +154,7 @@ void _ossl_old_des_ede3_cbc_encrypt(des_cblock *input, des_cblock *output,
}
void
_ossl_old_des_ede3_cfb64_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
long
length
,
des_key_schedule
ks1
,
des_key_schedule
ks2
,
des_key_schedule
ks3
,
des_cblock
*
ivec
,
int
*
num
,
int
enc
)
des_key_schedule
ks3
,
_ossl_old_
des_cblock
*
ivec
,
int
*
num
,
int
enc
)
{
DES_ede3_cfb64_encrypt
(
in
,
out
,
length
,
(
DES_key_schedule
*
)
ks1
,
(
DES_key_schedule
*
)
ks2
,
...
...
@@ -162,26 +162,26 @@ void _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out,
}
void
_ossl_old_des_ede3_ofb64_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
long
length
,
des_key_schedule
ks1
,
des_key_schedule
ks2
,
des_key_schedule
ks3
,
des_cblock
*
ivec
,
int
*
num
)
des_key_schedule
ks3
,
_ossl_old_
des_cblock
*
ivec
,
int
*
num
)
{
DES_ede3_ofb64_encrypt
(
in
,
out
,
length
,
(
DES_key_schedule
*
)
ks1
,
(
DES_key_schedule
*
)
ks2
,
(
DES_key_schedule
*
)
ks3
,
ivec
,
num
);
}
void
_ossl_old_des_xwhite_in2out
(
des_cblock
(
*
des_key
),
des_cblock
(
*
in_white
),
des_cblock
(
*
out_white
))
void
_ossl_old_des_xwhite_in2out
(
_ossl_old_des_cblock
(
*
des_key
),
_ossl_old_
des_cblock
(
*
in_white
),
_ossl_old_
des_cblock
(
*
out_white
))
{
DES_xwhite_in2out
(
des_key
,
in_white
,
out_white
);
}
int
_ossl_old_des_enc_read
(
int
fd
,
char
*
buf
,
int
len
,
des_key_schedule
sched
,
des_cblock
*
iv
)
_ossl_old_
des_cblock
*
iv
)
{
return
DES_enc_read
(
fd
,
buf
,
len
,
(
DES_key_schedule
*
)
sched
,
iv
);
}
int
_ossl_old_des_enc_write
(
int
fd
,
char
*
buf
,
int
len
,
des_key_schedule
sched
,
des_cblock
*
iv
)
_ossl_old_
des_cblock
*
iv
)
{
return
DES_enc_write
(
fd
,
buf
,
len
,
(
DES_key_schedule
*
)
sched
,
iv
);
}
...
...
@@ -198,73 +198,73 @@ char *_ossl_old_crypt(const char *buf,const char *salt)
return
DES_crypt
(
buf
,
salt
);
}
void
_ossl_old_des_ofb_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
int
numbits
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
)
int
numbits
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
)
{
DES_ofb_encrypt
(
in
,
out
,
numbits
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
);
}
void
_ossl_old_des_pcbc_encrypt
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
enc
)
void
_ossl_old_des_pcbc_encrypt
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
enc
)
{
DES_pcbc_encrypt
((
unsigned
char
*
)
input
,
(
unsigned
char
*
)
output
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
enc
);
}
DES_LONG
_ossl_old_des_quad_cksum
(
des_cblock
*
input
,
des_cblock
*
output
,
long
length
,
int
out_count
,
des_cblock
*
seed
)
DES_LONG
_ossl_old_des_quad_cksum
(
_ossl_old_des_cblock
*
input
,
_ossl_old_
des_cblock
*
output
,
long
length
,
int
out_count
,
_ossl_old_
des_cblock
*
seed
)
{
return
DES_quad_cksum
((
unsigned
char
*
)
input
,
output
,
length
,
out_count
,
seed
);
}
void
_ossl_old_des_random_seed
(
des_cblock
key
)
void
_ossl_old_des_random_seed
(
_ossl_old_
des_cblock
key
)
{
RAND_seed
(
key
,
sizeof
(
des_cblock
));
RAND_seed
(
key
,
sizeof
(
_ossl_old_
des_cblock
));
}
void
_ossl_old_des_random_key
(
des_cblock
ret
)
void
_ossl_old_des_random_key
(
_ossl_old_
des_cblock
ret
)
{
DES_random_key
((
DES_cblock
*
)
ret
);
}
int
_ossl_old_des_read_password
(
des_cblock
*
key
,
const
char
*
prompt
,
int
_ossl_old_des_read_password
(
_ossl_old_
des_cblock
*
key
,
const
char
*
prompt
,
int
verify
)
{
return
DES_read_password
(
key
,
prompt
,
verify
);
}
int
_ossl_old_des_read_2passwords
(
des_cblock
*
key1
,
des_cblock
*
key2
,
int
_ossl_old_des_read_2passwords
(
_ossl_old_des_cblock
*
key1
,
_ossl_old_
des_cblock
*
key2
,
const
char
*
prompt
,
int
verify
)
{
return
DES_read_2passwords
(
key1
,
key2
,
prompt
,
verify
);
}
void
_ossl_old_des_set_odd_parity
(
des_cblock
*
key
)
void
_ossl_old_des_set_odd_parity
(
_ossl_old_
des_cblock
*
key
)
{
DES_set_odd_parity
(
key
);
}
int
_ossl_old_des_is_weak_key
(
des_cblock
*
key
)
int
_ossl_old_des_is_weak_key
(
_ossl_old_
des_cblock
*
key
)
{
return
DES_is_weak_key
(
key
);
}
int
_ossl_old_des_set_key
(
des_cblock
*
key
,
des_key_schedule
schedule
)
int
_ossl_old_des_set_key
(
_ossl_old_
des_cblock
*
key
,
des_key_schedule
schedule
)
{
return
DES_set_key
(
key
,
(
DES_key_schedule
*
)
schedule
);
}
int
_ossl_old_des_key_sched
(
des_cblock
*
key
,
des_key_schedule
schedule
)
int
_ossl_old_des_key_sched
(
_ossl_old_
des_cblock
*
key
,
des_key_schedule
schedule
)
{
return
DES_key_sched
(
key
,
(
DES_key_schedule
*
)
schedule
);
}
void
_ossl_old_des_string_to_key
(
char
*
str
,
des_cblock
*
key
)
void
_ossl_old_des_string_to_key
(
char
*
str
,
_ossl_old_
des_cblock
*
key
)
{
DES_string_to_key
(
str
,
key
);
}
void
_ossl_old_des_string_to_2keys
(
char
*
str
,
des_cblock
*
key1
,
des_cblock
*
key2
)
void
_ossl_old_des_string_to_2keys
(
char
*
str
,
_ossl_old_des_cblock
*
key1
,
_ossl_old_
des_cblock
*
key2
)
{
DES_string_to_2keys
(
str
,
key1
,
key2
);
}
void
_ossl_old_des_cfb64_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
*
num
,
int
enc
)
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
*
num
,
int
enc
)
{
DES_cfb64_encrypt
(
in
,
out
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
num
,
enc
);
}
void
_ossl_old_des_ofb64_encrypt
(
unsigned
char
*
in
,
unsigned
char
*
out
,
long
length
,
des_key_schedule
schedule
,
des_cblock
*
ivec
,
int
*
num
)
des_key_schedule
schedule
,
_ossl_old_
des_cblock
*
ivec
,
int
*
num
)
{
DES_ofb64_encrypt
(
in
,
out
,
length
,
(
DES_key_schedule
*
)
schedule
,
ivec
,
num
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录