more testing
[my-code/crypto.git] / des.h
1 /*
2  * des.h - data encryption standard header file
3  *
4  * author: hackbard@hackdaworld.dyndns.org
5  *
6  */
7
8 #ifndef DES_H
9 #define DES_H
10
11 #define DES_SUBKEYS 16
12 #define DES_INITIAL_KEY_LEN 56
13 #define DES_SUBKEY_LEN 48
14 #define DES_DATA_BLOCK_LEN 64
15 #define DES_SBOXES 8
16 #define DES_SBOX_LEN 64
17 #define DES_PBOX_LEN 32
18
19 #define MODE_CRYPT 1
20 #define MODE_DECRYPT 2
21 #define MODE_ECB 4
22 #define MODE_CBC 8
23
24 typedef unsigned char u8;
25
26 int des_encrypt(u8 *plain,u8 *crypted,u8 *key,int len,u8 mode);
27 int des_decrypt(u8 *crypted,u8 *plain,u8 *key,int len,u8 mode);
28
29 #endif /* DES_H */