match_strval > try_val_to_str
[wireshark-wip.git] / wsutil / aes.h
blob45079eaa0ee472890acb25d3af68baab5e445238
1 /**
2 * aes.h
4 * Copied from airpdcap_rijndael.h
6 * $Id$
8 * @version 3.0 (December 2000)
10 * Optimised ANSI C code for the Rijndael cipher (now AES)
12 * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
13 * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
14 * @author Paulo Barreto <paulo.barreto@terra.com.br>
16 * This code is hereby placed in the public domain.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
19 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 /* Note: copied AirPDcap/rijndael/rijndael.h */
33 #ifndef _AES
34 #define _AES
36 #include "ws_symbol_export.h"
38 #define RIJNDAEL_MAXKC (256/32)
39 #define RIJNDAEL_MAXKB (256/8)
40 #define RIJNDAEL_MAXNR 14
42 typedef struct s_rijndael_ctx {
43 gint Nr; /* key-length-dependent number of rounds */
44 guint32 ek[4 * (RIJNDAEL_MAXNR + 1)]; /* encrypt key schedule */
45 guint32 dk[4 * (RIJNDAEL_MAXNR + 1)]; /* decrypt key schedule */
46 } rijndael_ctx;
49 WS_DLL_PUBLIC
50 void rijndael_set_key(
51 rijndael_ctx *ctx,
52 const guchar *key,
53 gint bits);
55 WS_DLL_PUBLIC
56 void rijndael_encrypt(
57 const rijndael_ctx *ctx,
58 const guchar *src,
59 guchar *dst);
61 WS_DLL_PUBLIC
62 void rijndael_decrypt(
63 const rijndael_ctx *ctx,
64 const guchar *src,
65 guchar *dst);
68 #endif