diff options
author | Richard Levitte <levitte@openssl.org> | 2001-10-24 21:21:12 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-10-24 21:21:12 +0000 |
commit | c2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch) | |
tree | 14dda5edeaebac01b4baa3aa026c40a784a44266 /crypto/des/rand_key.c | |
parent | 979689aa5cfa100ccbc1f25064e9398be4b7b05c (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/des/rand_key.c')
-rw-r--r-- | crypto/des/rand_key.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c index ee1a6c274e..a617969f70 100644 --- a/crypto/des/rand_key.c +++ b/crypto/des/rand_key.c @@ -56,18 +56,18 @@ #include <openssl/des.h> #include <openssl/rand.h> -void des_random_seed(des_cblock *key) +void DES_random_seed(DES_cblock *key) { - RAND_seed(key, sizeof(des_cblock)); + RAND_seed(key, sizeof(DES_cblock)); } -int des_random_key(des_cblock *ret) +int DES_random_key(DES_cblock *ret) { do { - if (RAND_bytes((unsigned char *)ret, sizeof(des_cblock)) != 1) + if (RAND_bytes((unsigned char *)ret, sizeof(DES_cblock)) != 1) return (0); - } while (des_is_weak_key(ret)); - des_set_odd_parity(ret); + } while (DES_is_weak_key(ret)); + DES_set_odd_parity(ret); return (1); } |