Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
37b7185b
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看板
提交
37b7185b
编写于
7月 29, 1999
作者:
U
Ulf Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Restore compability with kerberos/des.h (I had deleted some seemingly useless
definitions such as C_Block earlier).
上级
8c197cc5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
35 addition
and
40 deletion
+35
-40
crypto/des/des.h
crypto/des/des.h
+35
-40
未找到文件。
crypto/des/des.h
浏览文件 @
37b7185b
...
@@ -68,18 +68,13 @@ extern "C" {
...
@@ -68,18 +68,13 @@ extern "C" {
#endif
#endif
#ifdef _KERBEROS_DES_H
#ifdef _KERBEROS_DES_H
#error
kerberos/des.h and openssl/des.h
#error
<openssl/des.h> replaces <kerberos/des.h>.
#endif
#endif
#include <stdio.h>
#include <stdio.h>
#include <openssl/opensslconf.h>
/* DES_LONG */
#include <openssl/opensslconf.h>
/* DES_LONG */
#include <openssl/e_os2.h>
/* OPENSSL_EXTERN */
#include <openssl/e_os2.h>
/* OPENSSL_EXTERN */
#ifdef VMS
#undef des_init_random_number_generator
#define des_init_random_number_generator des_init_random_num_generator
#endif
typedef
unsigned
char
des_cblock
[
8
];
typedef
unsigned
char
des_cblock
[
8
];
typedef
/* const */
unsigned
char
const_des_cblock
[
8
];
typedef
/* const */
unsigned
char
const_des_cblock
[
8
];
/* With "const", gcc 2.8.1 on Solaris thinks that des_cblock *
/* With "const", gcc 2.8.1 on Solaris thinks that des_cblock *
...
@@ -91,7 +86,7 @@ typedef /* const */ unsigned char const_des_cblock[8];
...
@@ -91,7 +86,7 @@ typedef /* const */ unsigned char const_des_cblock[8];
typedef
struct
des_ks_struct
typedef
struct
des_ks_struct
{
{
union
{
union
{
des_cblock
cblock
;
des_cblock
_
;
/* make sure things are correct size on machines with
/* make sure things are correct size on machines with
* 8 byte longs */
* 8 byte longs */
DES_LONG
deslong
[
2
];
DES_LONG
deslong
[
2
];
...
@@ -120,30 +115,6 @@ typedef struct des_ks_struct
...
@@ -120,30 +115,6 @@ typedef struct des_ks_struct
#define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
#define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
#ifdef KERBEROS
#define ENCRYPT DES_ENCRYPT
#define DECRYPT DES_DECRYPT
#endif
#define KEY_SZ DES_KEY_SZ
#define string_to_key des_string_to_key
#define read_pw_string des_read_pw_string
#define random_key des_random_key
#define pcbc_encrypt des_pcbc_encrypt
#define set_key des_set_key
#define key_sched des_key_sched
#define ecb_encrypt des_ecb_encrypt
#define cbc_encrypt des_cbc_encrypt
#define ncbc_encrypt des_ncbc_encrypt
#define xcbc_encrypt des_xcbc_encrypt
#define cbc_cksum des_cbc_cksum
#define quad_cksum des_quad_cksum
/* For compatibility with the MIT lib - eay 20/05/92 */
typedef
des_key_schedule
bit_64
;
#define des_fixup_key_parity des_set_odd_parity
#define des_check_key_parity check_parity
OPENSSL_EXTERN
int
des_check_key
;
/* defaults to false */
OPENSSL_EXTERN
int
des_check_key
;
/* defaults to false */
OPENSSL_EXTERN
int
des_rw_mode
;
/* defaults to DES_PCBC_MODE */
OPENSSL_EXTERN
int
des_rw_mode
;
/* defaults to DES_PCBC_MODE */
OPENSSL_EXTERN
int
des_set_weak_key_flag
;
/* set the weak key flag */
OPENSSL_EXTERN
int
des_set_weak_key_flag
;
/* set the weak key flag */
...
@@ -236,17 +207,41 @@ int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);
...
@@ -236,17 +207,41 @@ int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);
/* Extra functions from Mark Murray <mark@grondar.za> */
/* Extra functions from Mark Murray <mark@grondar.za> */
void
des_cblock_print_file
(
const_des_cblock
*
cb
,
FILE
*
fp
);
void
des_cblock_print_file
(
const_des_cblock
*
cb
,
FILE
*
fp
);
#ifdef FreeBSD
/* The following definitions provide compatibility with the MIT Kerberos
/* The following functions are not in the normal unix build or the
* library. The des_key_schedule structure is not binary compatible. */
* SSLeay build. When using the SSLeay build, use RAND_seed()
* and RAND_bytes() instead. */
#define _KERBEROS_DES_H
int
des_new_random_key
(
des_cblock
*
key
);
void
des_init_random_number_generator
(
des_cblock
*
key
);
#define KRBDES_ENCRYPT DES_ENCRYPT
void
des_set_random_generator_seed
(
des_cblock
*
key
);
#define KRBDES_DECRYPT DES_DECRYPT
void
des_set_sequence_number
(
des_cblock
new_sequence_number
);
void
des_generate_random_block
(
des_cblock
*
block
);
#ifdef KERBEROS
# define ENCRYPT DES_ENCRYPT
# define DECRYPT DES_DECRYPT
#endif
#ifndef NCOMPAT
# define C_Block des_cblock
# define Key_schedule des_key_schedule
# define KEY_SZ DES_KEY_SZ
# define string_to_key des_string_to_key
# define read_pw_string des_read_pw_string
# define random_key des_random_key
# define pcbc_encrypt des_pcbc_encrypt
# define set_key des_set_key
# define key_sched des_key_sched
# define ecb_encrypt des_ecb_encrypt
# define cbc_encrypt des_cbc_encrypt
# define ncbc_encrypt des_ncbc_encrypt
# define xcbc_encrypt des_xcbc_encrypt
# define cbc_cksum des_cbc_cksum
# define quad_cksum des_quad_cksum
#endif
#endif
typedef
des_key_schedule
bit_64
;
#define des_fixup_key_parity des_set_odd_parity
#define des_check_key_parity check_parity
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录