6 * Description: Implementation of the ARCFOUR (RC4 compatible) stream cipher algorithm.
14 * length is length of key in bytes!
17 void arcfour_init(arcfour_ctx_t *c, uint8_t *key, uint8_t length){
20 for(x=0; x<= 255; ++x)
23 for(x=0; x<= 255; ++x){
24 y += c->s[x] + key[x % length];
34 uint8_t arcfour_gen(arcfour_ctx_t *c){
39 c->s[c->j] = c->s[c->i];
41 return c->s[(c->s[c->j] + c->s[c->i]) & 0xff];