00001 /* Droids-corp, Eirbot, Microb Technology 2005 - Zer0 00002 * Inspired by the ARC4 interface by Christophe Devine 00003 * The original licence is below 00004 * Interface for RC4 00005 */ 00006 00017 /* 00018 * An implementation of the ARC4 algorithm 00019 * 00020 * Copyright (C) 2001-2003 Christophe Devine 00021 * 00022 * This program is free software; you can redistribute it and/or modify 00023 * it under the terms of the GNU General Public License as published by 00024 * the Free Software Foundation; either version 2 of the License, or 00025 * (at your option) any later version. 00026 * 00027 * This program is distributed in the hope that it will be useful, 00028 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00029 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00030 * GNU General Public License for more details. 00031 * 00032 * You should have received a copy of the GNU General Public License 00033 * along with this program; if not, write to the Free Software 00034 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00035 */ 00036 00037 #ifndef _RC4_H 00038 #define _RC4_H 00039 00040 #include <aversive.h> 00041 00042 struct rc4_state 00043 { 00044 uint8_t x, y; 00045 uint8_t m[256]; 00046 }; 00047 00048 void rc4_init( uint8_t *key, uint8_t length ); 00049 uint8_t rc4_crypt_char(uint8_t data); 00050 00051 #endif /* rc4.h */