PolarSSL v1.2.5
xtea.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_XTEA_H
28 #define POLARSSL_XTEA_H
29 
30 #include <string.h>
31 
32 #ifdef _MSC_VER
33 #include <basetsd.h>
34 typedef UINT32 uint32_t;
35 #else
36 #include <inttypes.h>
37 #endif
38 
39 #define XTEA_ENCRYPT 1
40 #define XTEA_DECRYPT 0
41 
42 #define POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH -0x0028
47 typedef struct
48 {
49  uint32_t k[4];
50 }
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
63 void xtea_setup( xtea_context *ctx, unsigned char key[16] );
64 
76  int mode,
77  unsigned char input[8],
78  unsigned char output[8] );
79 
94  int mode,
95  size_t length,
96  unsigned char iv[8],
97  unsigned char *input,
98  unsigned char *output);
99 
105 int xtea_self_test( int verbose );
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* xtea.h */