des.c
static void key_rot_enc(char *k56, int r) {
    char mid = k56[28];
    k56[28] = '\0';      //split string

    if ((r >= 3 && r <= 8) || (r >= 10 && r <= 15)) {
        bstr_lrot(k56, 2);
        k56[28] = mid;
        bstr_lrot(k56 + 28, 2);
    } else {            //round 1, 2, 9, 16
        bstr_lrot(k56, 1);
        k56[28] = mid;
        bstr_lrot(k56 + 28, 1);
    }
}
/**
 * Rotates the specified 56-bit key according to the current round number. 
 * The key will be split in half and be rotated by 1 or 2 on each half based 
 * on the round number. This key rotation function is used for encryption. 
 *
 * PARAMETERS: 
 * k56 - the 56-bit key to rotate
 * r   - the round number
 */
Rotates the specified 56-bit key according to the current round number.
The key will be split in half and be rotated by 1 or 2 on each half based
on the round number. This key rotation function is used for encryption.

the 56-bit key to rotate
r   - the round number
Rotates the specified 56 - bit key according to the current round number . The key will be split in half and be rotated by 1 or 2 on each half based on the round number . This key rotation function is used for encryption . the 56 - bit key to rotate r - the round number
static void key_rot_enc(char *k56, int r) {
    char mid = k56[28];
    k56[28] = '\0';      
    if ((r >= 3 && r <= 8) || (r >= 10 && r <= 15)) {
        bstr_lrot(k56, 2);
        k56[28] = mid;
        bstr_lrot(k56 + 28, 2);
    } else {            
        bstr_lrot(k56, 1);
        k56[28] = mid;
        bstr_lrot(k56 + 28, 1);
    }
}
static void key_rot_enc ( char * k56 , int r ) { char mid = k56 [ 28 ] ; k56 [ 28 ] = ' \0 ' ; if ( ( r >= 3 && r <= 8 ) || ( r >= 10 && r <= 15 ) ) { bstr_lrot ( k56 , 2 ) ; k56 [ 28 ] = mid ; bstr_lrot ( k56 + 28 , 2 ) ; } else { bstr_lrot ( k56 , 1 ) ; k56 [ 28 ] = mid ; bstr_lrot ( k56 + 28 , 1 ) ; } }
Rotates the specified 56-bit key according to the current round number.
Rotates the specified 56 - bit key according to the current round number .
//split string //round 1, 2, 9, 16