Rationalise our include paths
[openafs.git] / src / des / des.h
1 /*
2  * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
3  *
4  * For copying and distribution information, please see the file
5  * <mit-cpyright.h>.
6  *
7  * Include file for the Data Encryption Standard library.
8  */
9
10 /* only do the whole thing once  */
11 #ifndef DES_DEFS
12 #define DES_DEFS
13
14 #if defined(UKERNEL)
15 #include "des/mit-cpyright.h"
16 #else /* defined(UKERNEL) */
17 #include "mit-cpyright.h"
18 #endif /* defined(UKERNEL) */
19
20 typedef unsigned char des_cblock[8];    /* crypto-block size */
21 /* Key schedule */
22 typedef struct des_ks_struct {
23     union {
24     afs_uint32 i[2];
25     des_cblock _;
26     } _;
27 } des_key_schedule[16];
28
29 #define DES_KEY_SZ      (sizeof(des_cblock))
30 #define DES_ENCRYPT     1
31 #define DES_DECRYPT     0
32
33 #ifndef NCOMPAT
34 #define C_Block des_cblock
35 #define Key_schedule des_key_schedule
36 #ifndef ENCRYPT
37 #define ENCRYPT DES_ENCRYPT
38 #define DECRYPT DES_DECRYPT
39 #endif
40 #define KEY_SZ DES_KEY_SZ
41 #define string_to_key des_string_to_key
42 #define read_pw_string des_read_pw_string
43 #define random_key des_random_key
44 #define pcbc_encrypt des_pcbc_encrypt
45 #ifdef AFS_DUX40_ENV
46 /* This is done to avoid name space collision with dtlogin and SIA. */
47 #define des_key_sched afs_des_key_sched
48 #endif
49 #define key_sched des_key_sched
50 #define cbc_encrypt des_cbc_encrypt
51 #define ecb_encrypt des_ecb_encrypt
52 #define cbc_cksum des_cbc_cksum
53 #define C_Block_print des_cblock_print
54 #define quad_cksum des_quad_cksum
55 typedef struct des_ks_struct bit_64;
56 #endif
57
58 #define des_cblock_print(x) des_cblock_print_file(x, stdout)
59
60 #endif /* DES_DEFS */