The Pedigree Project  0.1
des.h
Go to the documentation of this file.
1 
36 #include "netif/ppp/ppp_opts.h"
37 #if LWIP_INCLUDED_POLARSSL_DES
38 
39 #ifndef LWIP_INCLUDED_POLARSSL_DES_H
40 #define LWIP_INCLUDED_POLARSSL_DES_H
41 
42 #define DES_ENCRYPT 1
43 #define DES_DECRYPT 0
44 
48 typedef struct
49 {
50  int mode;
51  unsigned long sk[32];
52 }
53 des_context;
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
65 void des_setkey_enc( des_context *ctx, unsigned char key[8] );
66 
73 void des_setkey_dec( des_context *ctx, unsigned char key[8] );
74 
82 void des_crypt_ecb( des_context *ctx,
83  const unsigned char input[8],
84  unsigned char output[8] );
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* LWIP_INCLUDED_POLARSSL_DES_H */
91 
92 #endif /* LWIP_INCLUDED_POLARSSL_DES */