Lines Matching +full:no +full:- +full:rc4
1 /* $NetBSD: rc4.c,v 1.2 2017/01/28 21:31:47 christos Exp $ */
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
36 /* implemented from description in draft-kaukonen-cipher-arcfour-03.txt */
41 #include <rc4.h>
45 _t = k->state[x]; \
46 k->state[x] = k->state[y]; \
47 k->state[y] = _t; \
56 key->state[i] = i; in RC4_set_key()
58 j = (j + key->state[i] + data[i % len]) % 256; in RC4_set_key()
61 key->x = key->y = 0; in RC4_set_key()
65 RC4(RC4_KEY *key, const int len, const unsigned char *in, unsigned char *out) in RC4() function
70 x = key->x; in RC4()
71 y = key->y; in RC4()
74 y = (y + key->state[x]) % 256; in RC4()
76 t = (key->state[x] + key->state[y]) % 256; in RC4()
77 *out++ = key->state[t] ^ *in++; in RC4()
79 key->x = x; in RC4()
80 key->y = y; in RC4()