des.c
char *des_enc(char *msg, char *k64) {
    size_t msglen = bstr_len(msg);
    if (msglen != 64)
        return NULL;    //only 64 bit msg allowed

    char *k56 = key_init(k64);
    char *cipher = NULL;
    if (k56 != NULL) {
        cipher = des(msg, k56, &key_rot_enc);
        free(k56);
    }
    return cipher;
}
/**
 * Encrypts the specified message with the specified key. The key must be 
 * 64 bits, if it is not then it will be padded or truncated. The result 
 * cipher text will be dynamically allocated. If any error occurred, then 
 * NULL will be returned. The message length must be 64 bits. 
 *
 * PARAMETERS: 
 * msg - the message to encrypt
 * k64 - the 64-bit key
 *
 * RETURNS: 
 * The cipher text, or NULL if any error occurred. 
 */
Encrypts the specified message with the specified key. The key must be
64 bits, if it is not then it will be padded or truncated. The result
cipher text will be dynamically allocated. If any error occurred, then
NULL will be returned. The message length must be 64 bits.

the message to encrypt
k64 - the 64-bit key

The cipher text, or NULL if any error occurred.
Encrypts the specified message with the specified key . The key must be 64 bits if it is not then it will be padded or truncated . The result cipher text will be dynamically allocated . If any error occurred then NULL will be returned . The message length must be 64 bits . the message to encrypt k64 - the 64 - bit key The cipher text or NULL if any error occurred .
char *des_enc(char *msg, char *k64) {
    size_t msglen = bstr_len(msg);
    if (msglen != 64)
        return NULL;    
    char *k56 = key_init(k64);
    char *cipher = NULL;
    if (k56 != NULL) {
        cipher = des(msg, k56, &key_rot_enc);
        free(k56);
    }
    return cipher;
}
char * des_enc ( char * msg , char * k64 ) { size_t msglen = bstr_len ( msg ) ; if ( msglen != 64 ) return NULL ; char * k56 = key_init ( k64 ) ; char * cipher = NULL ; if ( k56 != NULL ) { cipher = des ( msg , k56 , & key_rot_enc ) ; free ( k56 ) ; } return cipher ; }
Encrypts the specified message with the specified key.
Encrypts the specified message with the specified key .
//only 64 bit msg allowed