initial import
[ICEs.git] / not-unused / des.c.ok
1 #include <netinet/in.h>
2 u_int32_t fp_maskl[8][256];
3 do_des(u_int32_t l_in, u_int32_t r_in, u_int32_t * l_out, u_int32_t * r_out, int count) {
4 u_int32_t l;
5 u_int32_t r;
6 u_int32_t f;
7 int round;
8 if (count == 0) {
9 while (round--) {
10 f ^= l;
11 r = f;
12 }
13 }
14 *l_out = fp_maskl[0][l >> 24] | fp_maskl[1][(l >> 16) & 0xff] | fp_maskl[2][(l >> 8) & 0xff] | fp_maskl[3][l & 0xff] | fp_maskl[4][r >> 24] | fp_maskl[5][(r >> 16) & 0xff] | fp_maskl[6][(r >> 8) & 0xff] | fp_maskl[7][r & 0xff];
15 }