123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef POLARSSL_XTEA_H
- #define POLARSSL_XTEA_H
- #include <string.h>
- #ifdef _MSC_VER
- #include <basetsd.h>
- typedef UINT32 uint32_t;
- #else
- #include <inttypes.h>
- #endif
- #define XTEA_ENCRYPT 1
- #define XTEA_DECRYPT 0
- #define POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH -0x0028
- typedef struct
- {
- uint32_t k[4];
- }
- xtea_context;
- #ifdef __cplusplus
- extern "C" {
- #endif
- void xtea_setup( xtea_context *ctx, unsigned char key[16] );
- int xtea_crypt_ecb( xtea_context *ctx,
- int mode,
- unsigned char input[8],
- unsigned char output[8] );
- int xtea_crypt_cbc( xtea_context *ctx,
- int mode,
- size_t length,
- unsigned char iv[8],
- unsigned char *input,
- unsigned char *output);
- int xtea_self_test( int verbose );
- #ifdef __cplusplus
- }
- #endif
- #endif
|