aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/md5.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 19:10:10 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 19:13:03 +0100
commit96d616052b3d39678e477fa10610ca688f46fff9 (patch)
tree8bd31d06318bc786ea8f1d84f92090c9c860bc11 /libavutil/md5.c
parent27506aceda8115f82f89691a4441d62a8cf24a6e (diff)
parentd12b5b2f135aade4099f4b26b0fe678656158c13 (diff)
downloadffmpeg-96d616052b3d39678e477fa10610ca688f46fff9.tar.gz
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13': build: Split test programs off into separate files Some conversions done by: James Almer <jamrial@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/md5.c')
-rw-r--r--libavutil/md5.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/libavutil/md5.c b/libavutil/md5.c
index 482582b5d1..057085b937 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -212,40 +212,3 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len)
av_md5_update(&ctx, src, len);
av_md5_final(&ctx, dst);
}
-
-#ifdef TEST
-#include <stdio.h>
-
-static void print_md5(uint8_t *md5)
-{
- int i;
- for (i = 0; i < 16; i++)
- printf("%02x", md5[i]);
- printf("\n");
-}
-
-int main(void)
-{
- uint8_t md5val[16];
- int i;
- volatile uint8_t in[1000]; // volatile to workaround http://llvm.org/bugs/show_bug.cgi?id=20849
- // FIXME remove volatile once it has been fixed and all fate clients are updated
-
- for (i = 0; i < 1000; i++)
- in[i] = i * i;
- av_md5_sum(md5val, in, 1000);
- print_md5(md5val);
- av_md5_sum(md5val, in, 63);
- print_md5(md5val);
- av_md5_sum(md5val, in, 64);
- print_md5(md5val);
- av_md5_sum(md5val, in, 65);
- print_md5(md5val);
- for (i = 0; i < 1000; i++)
- in[i] = i % 127;
- av_md5_sum(md5val, in, 999);
- print_md5(md5val);
-
- return 0;
-}
-#endif