]> andersk Git - moira.git/blob - include/des.h
Initial revision
[moira.git] / include / des.h
1 /*
2  * $Source$
3  * $Author$
4  * $Header$ 
5  *
6  * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
7  *
8  * For copying and distribution information, please see the file
9  * <mit-copyright.h>.
10  *
11  * Include file for the Data Encryption Standard library.
12  */
13
14 /* only do the whole thing once  */
15 #ifndef DES_DEFS
16 #define DES_DEFS
17
18 #include <mit-copyright.h>
19
20 typedef unsigned char des_cblock[8];    /* crypto-block size */
21 /* Key schedule */
22 typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16];
23
24 #define DES_KEY_SZ      (sizeof(des_cblock))
25 #define DES_ENCRYPT     1
26 #define DES_DECRYPT     0
27
28 #ifndef NCOMPAT
29 #define C_Block des_cblock
30 #define Key_schedule des_key_schedule
31 #define ENCRYPT DES_ENCRYPT
32 #define DECRYPT DES_DECRYPT
33 #define KEY_SZ DES_KEY_SZ
34 #define string_to_key des_string_to_key
35 #define read_pw_string des_read_pw_string
36 #define random_key des_random_key
37 #define pcbc_encrypt des_pcbc_encrypt
38 #define key_sched des_key_sched
39 #define cbc_encrypt des_cbc_encrypt
40 #define cbc_cksum des_cbc_cksum
41 #define C_Block_print des_cblock_print
42 #define quad_cksum des_quad_cksum
43 typedef struct des_ks_struct bit_64;
44 #endif
45
46 #define des_cblock_print(x) des_cblock_print_file(x, stdout)
47
48 #endif  DES_DEFS
This page took 0.055927 seconds and 5 git commands to generate.