extend_key_56_to_64(key_56, key);
/* Set the key */
- des_set_key(des, (const uint8_t*)key);
+ des_set_key(des, (const uint8_t *) key);
}
#elif defined(USE_GNUTLS)
extend_key_56_to_64(key_56, key);
/* Set the key */
- gcry_cipher_setkey(*des, key, 8);
+ gcry_cipher_setkey(*des, key, sizeof(key));
}
#elif defined(USE_NSS)
/* Import the key */
key_item.data = (unsigned char *)key;
- key_item.len = /* hard-wired */ 8;
+ key_item.len = sizeof(key);
symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
&key_item, NULL);
if(!symkey)
/* Setup the cipher control structure */
ctl.Func_ID = ENCRYPT_ONLY;
- ctl.Data_Len = 8;
+ ctl.Data_Len = sizeof(key);
/* Expand the 56-bit key to 64-bits */
extend_key_56_to_64(key_56, ctl.Crypto_Key);