From 2f252fed10e14ecd8b926aadf9a2f6075c5db1c0 Mon Sep 17 00:00:00 2001 From: Matt Braithwaite Date: Fri, 31 Jul 2015 14:42:36 -0700 Subject: [PATCH] Add |DES_set_key_unchecked| as an alias for |DES_set_key|. Change-Id: I00296b0602a95b51366586b30ccd95261dd7007b Reviewed-on: https://boringssl-review.googlesource.com/5532 Reviewed-by: Adam Langley --- crypto/des/des.c | 7 +++++++ include/openssl/des.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/crypto/des/des.c b/crypto/des/des.c index 9a0f5ac0..738793c4 100644 --- a/crypto/des/des.c +++ b/crypto/des/des.c @@ -770,3 +770,10 @@ void DES_ede2_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len, int enc) { DES_ede3_cbc_encrypt(in, out, len, ks1, ks2, ks1, ivec, enc); } + + +/* Deprecated functions. */ + +void DES_set_key_unchecked(const DES_cblock *key, DES_key_schedule *schedule) { + DES_set_key(key, schedule); +} diff --git a/include/openssl/des.h b/include/openssl/des.h index aa92c7b1..25a74686 100644 --- a/include/openssl/des.h +++ b/include/openssl/des.h @@ -144,6 +144,10 @@ OPENSSL_EXPORT void DES_ede2_cbc_encrypt(const uint8_t *in, uint8_t *out, /* Deprecated functions. */ +/* DES_set_key_unchecked calls |DES_set_key|. */ +OPENSSL_EXPORT void DES_set_key_unchecked(const DES_cblock *key, + DES_key_schedule *schedule); + OPENSSL_EXPORT void DES_ede3_cfb64_encrypt(const uint8_t *in, uint8_t *out, long length, DES_key_schedule *ks1, DES_key_schedule *ks2,