From 3fb108430645c15beb3c1f1c84fdfcd92de3bdb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 8 Mar 2009 14:51:25 +0000 Subject: [PATCH] Remove/replace code disabled by major version bump. Originally committed as revision 17875 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavutil/des.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavutil/des.c b/libavutil/des.c index 79fd531d8e..43f6c4ae2e 100644 --- a/libavutil/des.c +++ b/libavutil/des.c @@ -284,14 +284,6 @@ static uint64_t des_encdec(uint64_t in, uint64_t K[16], int decrypt) { return in; } -#if LIBAVUTIL_VERSION_MAJOR < 50 -uint64_t ff_des_encdec(uint64_t in, uint64_t key, int decrypt) { - uint64_t K[16]; - gen_roundkeys(K, key); - return des_encdec(in, K, decrypt); -} -#endif - int av_des_init(AVDES *d, const uint8_t *key, int key_bits, int decrypt) { if (key_bits != 64 && key_bits != 192) return -1; @@ -390,16 +382,16 @@ int main(void) { uint64_t key[3]; uint64_t data; uint64_t ct; + uint64_t roundkeys[16]; gettimeofday(&tv, NULL); srand(tv.tv_sec * 1000 * 1000 + tv.tv_usec); -#if LIBAVUTIL_VERSION_MAJOR < 50 key[0] = AV_RB64(test_key); data = AV_RB64(plain); - if (ff_des_encdec(data, key[0], 0) != AV_RB64(crypt)) { + gen_roundkeys(roundkeys, key[0]); + if (des_encdec(data, roundkeys, 0) != AV_RB64(crypt)) { printf("Test 1 failed\n"); return 1; } -#endif av_des_init(&d, test_key, 64, 0); av_des_crypt(&d, tmp, plain, 1, NULL, 0); if (memcmp(tmp, crypt, sizeof(crypt))) {