Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c0d64de6
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c0d64de6
编写于
11月 13, 2002
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make internal functions static.
上级
c1ce8cf3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
22 deletion
+22
-22
demos/engines/rsaref/rsaref.c
demos/engines/rsaref/rsaref.c
+22
-22
未找到文件。
demos/engines/rsaref/rsaref.c
浏览文件 @
c0d64de6
...
...
@@ -96,21 +96,21 @@ static int rsaref_digest_nids[] =
/*****************************************************************************
* DES functions
**/
int
cipher_des_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_des_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
);
int
cipher_des_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_des_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
);
int
cipher_des_cbc_clean
(
EVP_CIPHER_CTX
*
);
int
cipher_des_ede3_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_des_cbc_clean
(
EVP_CIPHER_CTX
*
);
static
int
cipher_des_ede3_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
);
int
cipher_des_ede3_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_des_ede3_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
);
int
cipher_des_ede3_cbc_clean
(
EVP_CIPHER_CTX
*
);
int
cipher_desx_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_des_ede3_cbc_clean
(
EVP_CIPHER_CTX
*
);
static
int
cipher_desx_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
);
int
cipher_desx_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_desx_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
);
int
cipher_desx_cbc_clean
(
EVP_CIPHER_CTX
*
);
static
int
cipher_desx_cbc_clean
(
EVP_CIPHER_CTX
*
);
/*****************************************************************************
* Our DES ciphers
...
...
@@ -403,7 +403,7 @@ static int rsaref_private_decrypt(int len, const unsigned char *from, unsigned c
if
(
!
RSAref_Private_eay2ref
(
rsa
,
&
RSAkey
))
goto
err
;
if
((
i
=
RSAPrivateDecrypt
(
to
,
&
(
unsigned
int
)
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
if
((
i
=
RSAPrivateDecrypt
(
to
,
(
unsigned
int
*
)
&
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
{
RSAREFerr
(
RSAREF_F_RSAREF_PRIVATE_DECRYPT
,
i
);
outlen
=
-
1
;
...
...
@@ -426,7 +426,7 @@ static int rsaref_private_encrypt(int len, const unsigned char *from, unsigned c
}
if
(
!
RSAref_Private_eay2ref
(
rsa
,
&
RSAkey
))
goto
err
;
if
((
i
=
RSAPrivateEncrypt
(
to
,
&
(
unsigned
int
)
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
if
((
i
=
RSAPrivateEncrypt
(
to
,
(
unsigned
int
)
&
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
{
RSAREFerr
(
RSAREF_F_RSAREF_PRIVATE_ENCRYPT
,
i
);
outlen
=
-
1
;
...
...
@@ -444,7 +444,7 @@ static int rsaref_public_decrypt(int len, const unsigned char *from, unsigned ch
if
(
!
RSAref_Public_eay2ref
(
rsa
,
&
RSAkey
))
goto
err
;
if
((
i
=
RSAPublicDecrypt
(
to
,
&
(
unsigned
int
)
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
if
((
i
=
RSAPublicDecrypt
(
to
,
(
unsigned
int
)
&
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
))
!=
0
)
{
RSAREFerr
(
RSAREF_F_RSAREF_PUBLIC_DECRYPT
,
i
);
outlen
=
-
1
;
...
...
@@ -481,7 +481,7 @@ static int rsaref_public_encrypt(int len, const unsigned char *from, unsigned ch
if
(
!
RSAref_Public_eay2ref
(
rsa
,
&
RSAkey
))
goto
err
;
if
((
i
=
RSAPublicEncrypt
(
to
,
&
(
unsigned
int
)
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
,
&
rnd
))
!=
0
)
if
((
i
=
RSAPublicEncrypt
(
to
,
(
unsigned
int
)
&
outlen
,(
unsigned
char
*
)
from
,
len
,
&
RSAkey
,
&
rnd
))
!=
0
)
{
RSAREFerr
(
RSAREF_F_RSAREF_PUBLIC_ENCRYPT
,
i
);
outlen
=
-
1
;
...
...
@@ -553,13 +553,13 @@ static int rsaref_digests(ENGINE *e, const EVP_MD **digest,
**/
#undef data
#define data(ctx) ((DES_CBC_CTX *)(ctx)->cipher_data)
int
cipher_des_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_des_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
)
{
DES_CBCInit
(
data
(
ctx
),
(
unsigned
char
*
)
key
,
(
unsigned
char
*
)
iv
,
enc
);
return
1
;
}
int
cipher_des_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_des_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
)
{
int
ret
=
DES_CBCUpdate
(
data
(
ctx
),
out
,
(
unsigned
char
*
)
in
,
inl
);
...
...
@@ -575,7 +575,7 @@ int cipher_des_cbc_code(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
return
!
ret
;
}
int
cipher_des_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
static
int
cipher_des_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
{
memset
(
data
(
ctx
),
0
,
ctx
->
cipher
->
ctx_size
);
return
1
;
...
...
@@ -583,14 +583,14 @@ int cipher_des_cbc_clean(EVP_CIPHER_CTX *ctx)
#undef data
#define data(ctx) ((DES3_CBC_CTX *)(ctx)->cipher_data)
int
cipher_des_ede3_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_des_ede3_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
)
{
DES3_CBCInit
(
data
(
ctx
),
(
unsigned
char
*
)
key
,
(
unsigned
char
*
)
iv
,
enc
);
return
1
;
}
int
cipher_des_ede3_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_des_ede3_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
)
{
int
ret
=
DES3_CBCUpdate
(
data
(
ctx
),
out
,
(
unsigned
char
*
)
in
,
inl
);
...
...
@@ -606,7 +606,7 @@ int cipher_des_ede3_cbc_code(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
return
!
ret
;
}
int
cipher_des_ede3_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
static
int
cipher_des_ede3_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
{
memset
(
data
(
ctx
),
0
,
ctx
->
cipher
->
ctx_size
);
return
1
;
...
...
@@ -614,14 +614,14 @@ int cipher_des_ede3_cbc_clean(EVP_CIPHER_CTX *ctx)
#undef data
#define data(ctx) ((DESX_CBC_CTX *)(ctx)->cipher_data)
int
cipher_desx_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
static
int
cipher_desx_cbc_init
(
EVP_CIPHER_CTX
*
ctx
,
const
unsigned
char
*
key
,
const
unsigned
char
*
iv
,
int
enc
)
{
DESX_CBCInit
(
data
(
ctx
),
(
unsigned
char
*
)
key
,
(
unsigned
char
*
)
iv
,
enc
);
return
1
;
}
int
cipher_desx_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
static
int
cipher_desx_cbc_code
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
const
unsigned
char
*
in
,
unsigned
int
inl
)
{
int
ret
=
DESX_CBCUpdate
(
data
(
ctx
),
out
,
(
unsigned
char
*
)
in
,
inl
);
...
...
@@ -637,7 +637,7 @@ int cipher_desx_cbc_code(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
return
!
ret
;
}
int
cipher_desx_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
static
int
cipher_desx_cbc_clean
(
EVP_CIPHER_CTX
*
ctx
)
{
memset
(
data
(
ctx
),
0
,
ctx
->
cipher
->
ctx_size
);
return
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录