2003-08-13 01:53:07 +00:00
/*
Unix SMB / CIFS implementation .
2004-11-02 06:14:15 +00:00
Copyright ( C ) Andrew Tridgell 2004
2003-08-13 01:53:07 +00:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 02:07:03 +00:00
the Free Software Foundation ; either version 3 of the License , or
2003-08-13 01:53:07 +00:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 02:07:03 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2003-08-13 01:53:07 +00:00
*/
2006-08-11 08:02:43 +00:00
# include "lib/crypto/crc32.h"
2004-11-02 06:14:15 +00:00
# include "lib/crypto/md4.h"
2006-08-11 08:02:43 +00:00
# include "lib/crypto/md5.h"
2004-11-02 06:14:15 +00:00
# include "lib/crypto/hmacmd5.h"
2006-08-11 08:02:43 +00:00
# include "lib/crypto/sha1.h"
# include "lib/crypto/hmacsha1.h"
2005-04-25 08:26:53 +00:00
struct arcfour_state {
uint8_t sbox [ 256 ] ;
uint8_t index_i ;
uint8_t index_j ;
} ;
2005-08-20 07:59:00 +00:00
void arcfour_init ( struct arcfour_state * state , const DATA_BLOB * key ) ;
void arcfour_crypt_sbox ( struct arcfour_state * state , uint8_t * data , int len ) ;
void arcfour_crypt_blob ( uint8_t * data , int len , const DATA_BLOB * key ) ;
void arcfour_crypt ( uint8_t * data , const uint8_t keystr [ 16 ] , int len ) ;