UNIX. octopus.stu.lipetsk.ru
11

register ARCH_WORD mask;

mask = 0;

if (DES_bs_mem_saving)

for (bit = 0; bit < ((count < 32) ? count : 32); bit++) {

mask |= DES_bs_all.B[bit] ^

((binary[0] & (1 << bit)) ? ~(ARCH_WORD)0 : 0);

if (mask == ~(ARCH_WORD)0) return 0;

}

else

for (bit = 0; bit < count; bit++) {

mask |= DES_bs_all.B[bit] ^ binary[bit];

if (mask == ~(ARCH_WORD)0) return 0;

}

return 1;

}

int DES_bs_cmp_one(ARCH_WORD *binary, int count, int index)

{

register int bit;

register ARCH_WORD mask;

if (DES_bs_mem_saving) {

for (bit = 0; bit < count; bit++)

if (((DES_bs_all.B[bit] >> index) ^

(binary[bit >> 5] >> (bit & 0x1F))) & 1) return 0;

return 1;

}

mask = (ARCH_WORD)1 << index;

for (bit = 0; bit < count; bit++)

if ((DES_bs_all.B[bit] ^ binary[bit]) & mask) return 0;

return 1;

}

: 1 2 3 4 5 6 7 8 9 10 11