diff options
author | Gerald Combs <gerald@wireshark.org> | 2006-12-28 17:22:12 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2006-12-28 17:22:12 +0000 |
commit | bd282b4114be8c7060fbc3873a04b80ec18317b8 (patch) | |
tree | ef14ce379885a746930a9839b20bebb530b35d04 /epan/crypt/airpdcap_rijndael.h | |
parent | 60180815a6a70d264fdf4f6ff9f49eeb1a7c6742 (diff) |
Move the contents of airpdcap to epan/crypt. Try to fix the current
distcheck failure. Move the nmake build targets for airpdcap from
epan/dissectors to epan. This will probably break the Windows build.
svn path=/trunk/; revision=20231
Diffstat (limited to 'epan/crypt/airpdcap_rijndael.h')
-rw-r--r-- | epan/crypt/airpdcap_rijndael.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/epan/crypt/airpdcap_rijndael.h b/epan/crypt/airpdcap_rijndael.h new file mode 100644 index 0000000000..b113c84643 --- /dev/null +++ b/epan/crypt/airpdcap_rijndael.h @@ -0,0 +1,68 @@ +#ifndef _AIRPDCAP_RIJNDAEL +#define _AIRPDCAP_RIJNDAEL + +/******************************************************************************/ +/* File includes */ +/* */ +#include "airpdcap_interop.h" +/* */ +/* */ +/******************************************************************************/ + +/******************************************************************************/ +/* Definitions */ +/* */ +/* Note: copied AirPDcap/rijndael/rijndael.h */ +#define RIJNDAEL_MAXKC (256/32) +#define RIJNDAEL_MAXKB (256/8) +#define RIJNDAEL_MAXNR 14 +/* */ +/******************************************************************************/ + +/******************************************************************************/ +/* Type definitions */ +/* */ +/* Note: copied AirPDcap/rijndael/rijndael.h */ +typedef struct s_rijndael_ctx { + INT decrypt; + INT Nr; /* key-length-dependent number of rounds */ + UINT32 ek[4 * (RIJNDAEL_MAXNR + 1)]; /* encrypt key schedule */ + UINT32 dk[4 * (RIJNDAEL_MAXNR + 1)]; /* decrypt key schedule */ +} rijndael_ctx; +/* */ +/******************************************************************************/ + +/******************************************************************************/ +/* External function prototypes declarations */ +/* */ +void rijndael_encrypt( + const rijndael_ctx *ctx, + const UCHAR *src, + UCHAR *dst) + ; + + +void rijndael_set_key( + rijndael_ctx *ctx, + const UCHAR *key, + INT bits) + ; +/* */ +/******************************************************************************/ + +/******************************************************************************/ +/* External function definition */ +/* */ +static __inline void xor_block( + UINT8 *b, + const UINT8 *a, + size_t len) +{ + INT i; + for (i = 0; i < (INT)len; i++) + b[i] ^= a[i]; +} +/* */ +/******************************************************************************/ + +#endif |