1 /* Retrieved from http://www.cr0.net:8040/code/crypto/aes/aes.h */ 2 3 #ifndef _AES_H 4 #define _AES_H 5 6 #ifndef uint8 7 #define uint8 unsigned char 8 #endif 9 10 #ifndef uint32 11 #define uint32 unsigned long int 12 #endif 13 14 typedef struct 15 { 16 uint32 erk[64]; /* encryption round keys */ 17 uint32 drk[64]; /* decryption round keys */ 18 int nr; /* number of rounds */ 19 } 20 aes_context; 21 22 int aes_set_key( aes_context *ctx, uint8 *key, int nbits ); 23 void aes_encrypt( aes_context *ctx, uint8 input[16], uint8 output[16] ); 24 void aes_decrypt( aes_context *ctx, uint8 input[16], uint8 output[16] ); 25 26 #endif /* aes.h */ 27