37 unsigned int ust1, ust2;
38 unsigned int keyindex;
39 unsigned int stateindex;
46 for (idx = 0; idx < 256; idx++)
50 for (idx = 0; idx < 256; idx++) {
52 stateindex = (stateindex + pbyKey[keyindex] + ust1) & 0xff;
53 ust2 = pbyst[stateindex];
54 pbyst[stateindex] = (
BYTE)ust1;
56 if (++keyindex >= cbKey_len)
65 unsigned int ustx, usty;
69 ux = (pRC4->
ux + 1) & 0xff;
71 uy = (ustx + pRC4->
uy) & 0xff;
75 pbyst[uy] = (
BYTE)ustx;
76 pbyst[ux] = (
BYTE)usty;
78 return pbyst[(ustx + usty) & 0xff];
82 PBYTE pbySrc,
unsigned int cbData_len)
85 for (ii = 0; ii < cbData_len; ii++)