FreeTDS API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
des.h
1 #ifndef DES_H
2 #define DES_H
3
4 /* $Id: des.h,v 1.13 2010-01-25 23:05:58 freddy77 Exp $ */
5
6 #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__MINGW32__)
7 #pragma GCC visibility push(hidden)
8 #endif
9
10 typedef unsigned char des_cblock[8];
11
12 typedef struct des_key
13 {
14 unsigned char kn[16][8];
15 TDS_UINT sp[8][64];
16 unsigned char iperm[16][16][8];
17 unsigned char fperm[16][16][8];
18 } DES_KEY;
19
20 void tds_des_set_odd_parity(des_cblock key);
21 int tds_des_ecb_encrypt(const void *plaintext, int len, DES_KEY * akey, des_cblock output);
22 int tds_des_set_key(DES_KEY * dkey, des_cblock user_key, int len);
23 void tds_des_encrypt(DES_KEY * key, des_cblock block);
24 void _mcrypt_decrypt(DES_KEY * key, unsigned char *block);
25
26 #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__MINGW32__)
27 #pragma GCC visibility pop
28 #endif
29
30 #endif /* !DES_H */