hostsim test
[aversive.git] / modules / crypto / rc4 / rc4.h
1 /* Droids-corp, Eirbot, Microb Technology 2005 - Zer0
2  * Inspired by the ARC4 interface by Christophe Devine
3  * The original licence is below
4  * Interface for RC4
5  */
6
7 /** \file rc4.c
8  *  \brief Interface for the RC4 module.
9  *
10  *  \todo Test the module.
11  *
12  *  \test No tests for the moment.
13  *
14  * This module provides RC4 cryptographic functions.
15  */
16
17 /*
18  *  An implementation of the ARC4 algorithm
19  *
20  *  Copyright (C) 2001-2003  Christophe Devine
21  *
22  *  This program is free software; you can redistribute it and/or modify
23  *  it under the terms of the GNU General Public License as published by
24  *  the Free Software Foundation; either version 2 of the License, or
25  *  (at your option) any later version.
26  *
27  *  This program is distributed in the hope that it will be useful,
28  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
29  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30  *  GNU General Public License for more details.
31  *
32  *  You should have received a copy of the GNU General Public License
33  *  along with this program; if not, write to the Free Software
34  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
35  */
36
37 #ifndef _RC4_H
38 #define _RC4_H
39
40 #include <aversive.h>
41
42 struct rc4_state
43 {
44   uint8_t x, y;
45   uint8_t m[256];
46 };
47
48 void rc4_init( uint8_t *key,  uint8_t length );
49 uint8_t rc4_crypt_char(uint8_t data);
50
51 #endif /* rc4.h */