From 1f4c504b425235da5e19cce3082f1768c74330ba Mon Sep 17 00:00:00 2001 From: Mike Goslin Date: Tue, 7 Nov 2000 20:03:47 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/downloadertools/Makefile.check_md5 | 0 panda/src/downloadertools/Sources.pp | 10 ++++++++++ panda/src/downloadertools/check_md5.cxx | 17 +++++++++++++++++ 3 files changed, 27 insertions(+) delete mode 100644 panda/src/downloadertools/Makefile.check_md5 create mode 100644 panda/src/downloadertools/check_md5.cxx diff --git a/panda/src/downloadertools/Makefile.check_md5 b/panda/src/downloadertools/Makefile.check_md5 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/panda/src/downloadertools/Sources.pp b/panda/src/downloadertools/Sources.pp index 334cb3971a..60a572f2f7 100644 --- a/panda/src/downloadertools/Sources.pp +++ b/panda/src/downloadertools/Sources.pp @@ -41,6 +41,16 @@ #end bin_target +#begin bin_target + #define TARGET check_md5 + #define TARGET_IF_CRYPTO yes + #define USE_CRYPTO yes + + #define SOURCES \ + check_md5.cxx + +#end bin_target + #begin bin_target #define TARGET multify diff --git a/panda/src/downloadertools/check_md5.cxx b/panda/src/downloadertools/check_md5.cxx new file mode 100644 index 0000000000..694f43870e --- /dev/null +++ b/panda/src/downloadertools/check_md5.cxx @@ -0,0 +1,17 @@ +#include + +int +main(int argc, char *argv[]) { + if (argc < 2) { + cerr << "Usage: check_md5 " << endl; + return 0; + } + + Filename source_file = argv[1]; + + HashVal hash; + md5_a_file(source_file, hash); + cout << hash << endl; + + return 1; +}