1/* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License as 4 * published by the Free Software Foundation; either version 2 of 5 * the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 15 * MA 02111-1307 USA 16 */ 17/* 18 * rc4.h 19 * RC4 stream cipher 20 * 21 * Copyright 2003, ASUSTeK Inc. 22 * All Rights Reserved. 23 * 24 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of ASUSTeK Inc.; the 25 * contents of this file may not be disclosed to third parties, copied or 26 * duplicated in any form, in whole or in part, without the prior written 27 * permission of ASUSTeK Inc.. 28 * 29 */ 30 31#ifndef _RC4_H_ 32#define _RC4_H_ 33 34#include <typedefs.h> 35 36#define RC4_STATE_NBYTES 256 37 38typedef struct rc4_ks 39{ 40 uchar state[RC4_STATE_NBYTES]; 41 uchar x; 42 uchar y; 43} rc4_ks_t; 44 45void prepare_key(uchar *key_data_ptr, int key_data_len, rc4_ks_t *key); 46 47void rc4(uchar *buffer_ptr, int buffer_len, rc4_ks_t *key); 48 49#endif /* _RC4_H_ */ 50 51