57 for (i = 0; i < 12; i++)
58 keys[i] =
AV_RL32(keybuf + (i << 2)) | 1;
69 for (i = 0; i < 5; i++)
71 for (i = 6; i < 11; i++)
79 for (i = 1; i < 5; i++) {
80 v = (v >> 16) | (v << 16);
91 for (i = 4; i > 0; i--) {
93 v = (v >> 16) | (v << 16);
108 uint64_t key, uint64_t
data)
111 uint32_t
b = data >> 32;
117 c = (key >> 32) + tmp;
120 return ((uint64_t)c << 32) | tmp;
132 uint64_t key, uint64_t
data)
136 uint32_t
c = data >> 32;
140 tmp = c - (key >> 32);
144 return ((uint64_t)b << 32) |
a;
151 int num_qwords = len >> 3;
153 uint64_t rc4buff[8] = { 0 };
155 uint32_t ms_keys[12];
159 for (i = 0; i <
len; i++)
168 packetkey =
AV_RN64(&qwords[num_qwords * 8 - 8]);
169 packetkey ^= rc4buff[7];
172 packetkey ^= rc4buff[6];
178 for (i = 0; i < num_qwords - 1; i++, qwords += 8)
181 packetkey = (packetkey << 32) | (packetkey >> 32);