Commit 64eeb0d6 authored by Sevan Janiyan's avatar Sevan Janiyan Committed by GitHub
Browse files

Switch from des_ to DES_ prefix functions. (#329)

The original des_ prefixed functions were renamed to use a DES_prefix in OpenSSL 0.9.7.
This enables linking against modern OpenSSL forks such as LibreSSL.
parent 9087c649
......@@ -96,18 +96,18 @@ MakeKey(u_char *key, u_char *des_key)
des_key[6] = Get7Bits(key, 42);
des_key[7] = Get7Bits(key, 49);
des_set_odd_parity((des_cblock *)des_key);
DES_set_odd_parity((DES_cblock *)des_key);
}
static void /* IN 8 octets IN 7 octest OUT 8 octets */
DesEncrypt(u_char *clear, u_char *key, u_char *cipher)
{
des_cblock des_key;
des_key_schedule key_schedule;
DES_cblock des_key;
DES_key_schedule key_schedule;
MakeKey(key, des_key);
des_set_key(&des_key, key_schedule);
des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
DES_set_key(&des_key, &key_schedule);
DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1);
}
#define LENGTH 20
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment