55 for (i = 0; i < 12; i++)
56 keys[i] =
AV_RL32(keybuf + (i << 2)) | 1;
66 for (i = 0; i < 5; i++)
68 for (i = 6; i < 11; i++)
75 for (i = 1; i < 5; i++) {
76 v = (v >> 16) | (v << 16);
86 for (i = 4; i > 0; i--) {
88 v = (v >> 16) | (v << 16);
104 uint32_t
b = data >> 32;
110 c = (key >> 32) + tmp;
113 return ((uint64_t)c << 32) | tmp;
127 uint32_t
c = data >> 32;
131 tmp = c - (key >> 32);
135 return ((uint64_t)b << 32) |
a;
141 int num_qwords = len >> 3;
143 uint64_t rc4buff[8] = { 0 };
145 uint32_t ms_keys[12];
149 for (i = 0; i <
len; i++)
158 packetkey =
AV_RN64(&qwords[num_qwords*8 - 8]);
159 packetkey ^= rc4buff[7];
162 packetkey ^= rc4buff[6];
168 for (i = 0; i < num_qwords - 1; i++, qwords += 8)
171 packetkey = (packetkey << 32) | (packetkey >> 32);