diff options
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); } |