Windows global stuff:
[krb5.git] / src / lib / des425 / des.h
1 /*
2  * lib/des425/des.h
3  *
4  * Copyright 1991 by the Massachusetts Institute of Technology.
5  * All Rights Reserved.
6  *
7  * Export of this software from the United States of America may
8  *   require a specific license from the United States Government.
9  *   It is the responsibility of any person or organization contemplating
10  *   export to obtain such a license before exporting.
11  * 
12  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13  * distribute this software and its documentation for any purpose and
14  * without fee is hereby granted, provided that the above copyright
15  * notice appear in all copies and that both that copyright notice and
16  * this permission notice appear in supporting documentation, and that
17  * the name of M.I.T. not be used in advertising or publicity pertaining
18  * to distribution of the software without specific, written prior
19  * permission.  M.I.T. makes no representations about the suitability of
20  * this software for any purpose.  It is provided "as is" without express
21  * or implied warranty.
22  * 
23  *
24  */
25
26 /*
27  * Include file for the Data Encryption Standard library.
28  */
29
30 /* only do the whole thing once  */
31 #ifndef DES_DEFS
32 #define DES_DEFS
33
34 #include "k5-int.h"
35 #include "des_int.h"
36
37 typedef mit_des_cblock des_cblock;      /* crypto-block size */
38
39 /* Key schedule */
40 typedef mit_des_key_schedule des_key_schedule;
41
42 #define DES_KEY_SZ      (sizeof(des_cblock))
43 #define DES_ENCRYPT     1
44 #define DES_DECRYPT     0
45
46 #ifndef NCOMPAT
47 #define C_Block des_cblock
48 #define Key_schedule des_key_schedule
49 #define ENCRYPT DES_ENCRYPT
50 #define DECRYPT DES_DECRYPT
51 #define KEY_SZ DES_KEY_SZ
52 #define string_to_key des_string_to_key
53 #define read_pw_string des_read_pw_string
54 #define random_key des_random_key
55 #define pcbc_encrypt des_pcbc_encrypt
56 #define key_sched des_key_sched
57 #define cbc_encrypt des_cbc_encrypt
58 #define cbc_cksum des_cbc_cksum
59 #define C_Block_print des_cblock_print
60 #define quad_cksum des_quad_cksum
61 typedef struct des_ks_struct bit_64;
62 #endif
63
64 #define des_cblock_print(x) des_cblock_print_file(x, stdout)
65
66 /*
67  * Windows needs everything prototyped because we're exporting all the fuctions.
68  */
69 void des_cbc_cksum();
70 int des_ecb_encrypt();
71 int des_cbc_encrypt();
72 void des_fixup_key_parity();
73 int des_check_key_parity();
74 int des_key_sched();
75 int des_new_random_key();
76 void des_init_random_number_generator();
77 void des_set_random_generator_seed();
78 void des_set_sequence_number();
79 void des_generate_random_block();
80 int des_pcbc_encrypt();
81 unsigned long des_quad_cksum();
82 int des_random_key();
83 krb5_error_code des_read_password();
84 int des_string_to_key();
85 int des_is_weak_key();
86
87 #endif  /* DES_DEFS */