summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_des.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
committerRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
commitc2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch)
tree14dda5edeaebac01b4baa3aa026c40a784a44266 /crypto/evp/e_des.c
parent979689aa5cfa100ccbc1f25064e9398be4b7b05c (diff)
Due to an increasing number of clashes between modern OpenSSL and
libdes (which is still used out there) or other des implementations, the OpenSSL DES functions are renamed to begin with DES_ instead of des_. Compatibility routines are provided and declared by including openssl/des_old.h. Those declarations are the same as were in des.h when the OpenSSL project started, which is exactly how libdes looked at that time, and hopefully still looks today. The compatibility functions will be removed in some future release, at the latest in version 1.0.
Diffstat (limited to 'crypto/evp/e_des.c')
-rw-r--r--crypto/evp/e_des.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c
index ed2594311f..3e2cf30a6b 100644
--- a/crypto/evp/e_des.c
+++ b/crypto/evp/e_des.c
@@ -73,34 +73,34 @@ static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
BLOCK_CIPHER_ecb_loop()
- des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->cipher_data, ctx->encrypt);
+ DES_ecb_encrypt((DES_cblock *)(in + i), (DES_cblock *)(out + i), ctx->cipher_data, ctx->encrypt);
return 1;
}
static int des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_ofb64_encrypt(in, out, (long)inl, ctx->cipher_data, (des_cblock *)ctx->iv, &ctx->num);
+ DES_ofb64_encrypt(in, out, (long)inl, ctx->cipher_data, (DES_cblock *)ctx->iv, &ctx->num);
return 1;
}
static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_ncbc_encrypt(in, out, (long)inl, ctx->cipher_data,
- (des_cblock *)ctx->iv, ctx->encrypt);
+ DES_ncbc_encrypt(in, out, (long)inl, ctx->cipher_data,
+ (DES_cblock *)ctx->iv, ctx->encrypt);
return 1;
}
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
- (des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
+ DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
+ (DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
return 1;
}
-BLOCK_CIPHER_defs(des, des_key_schedule, NID_des, 8, 8, 8,
+BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8,
0, des_init_key, NULL,
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
@@ -110,9 +110,9 @@ BLOCK_CIPHER_defs(des, des_key_schedule, NID_des, 8, 8, 8,
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
- des_cblock *deskey = (des_cblock *)key;
+ DES_cblock *deskey = (DES_cblock *)key;
- des_set_key_unchecked(deskey,ctx->cipher_data);
+ DES_set_key_unchecked(deskey,ctx->cipher_data);
return 1;
}