FreeBSD/usr.sbin/ppp/chap_ms.c
/* IN  56 bit DES key missing parity bits
   OUT 64 bit DES key with parity bits added */
IN  56 bit DES key missing parity bits
OUT 64 bit DES key with parity bits added
IN 56 bit DES key missing parity bits OUT 64 bit DES key with parity bits added
static void
MakeKey(u_char *key, u_char *des_key)
{
    des_key[0] = Get7Bits(key,  0);
    des_key[1] = Get7Bits(key,  7);
    des_key[2] = Get7Bits(key, 14);
    des_key[3] = Get7Bits(key, 21);
    des_key[4] = Get7Bits(key, 28);
    des_key[5] = Get7Bits(key, 35);
    des_key[6] = Get7Bits(key, 42);
    des_key[7] = Get7Bits(key, 49);
    des_set_odd_parity((des_cblock *)des_key);
}
static void MakeKey ( u_char * key , u_char * des_key ) { des_key [ 0 ] = Get7Bits ( key , 0 ) ; des_key [ 1 ] = Get7Bits ( key , 7 ) ; des_key [ 2 ] = Get7Bits ( key , 14 ) ; des_key [ 3 ] = Get7Bits ( key , 21 ) ; des_key [ 4 ] = Get7Bits ( key , 28 ) ; des_key [ 5 ] = Get7Bits ( key , 35 ) ; des_key [ 6 ] = Get7Bits ( key , 42 ) ; des_key [ 7 ] = Get7Bits ( key , 49 ) ; des_set_odd_parity ( ( des_cblock * ) des_key ) ; }
IN  56 bit DES key missing parity bits
OUT 64 bit DES key with parity bits added
IN 56 bit DES key missing parity bits OUT 64 bit DES key with parity bits added