diff options
author | Brendan Cully <brendan@kublai.com> | 2008-05-17 17:36:05 -0700 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2008-05-17 17:36:05 -0700 |
commit | 27a1b5eb57b710744d7e85b5dae6ace097eee359 (patch) | |
tree | f5b9e97dc450fe1b380bc8ccadb031f44e0e8e8c /md5.c | |
parent | f7884cbed872e878ea7e08a4f157bc56cf92873d (diff) |
Build local md5 tool for hcachever.sh. Closes #3025.
Diffstat (limited to 'md5.c')
-rw-r--r-- | md5.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -450,3 +450,22 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) ctx->C = C; ctx->D = D; } + +#ifdef MD5UTIL +/* local md5 equivalent for header cache versioning */ +int main(int argc, char** argv) +{ + unsigned char r[16]; + int rc; + + if ((rc = md5_stream(stdin, r))) + return rc; + + printf("%02x%02x%02x%02x%02x%02x%02x%02x" + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], + r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]); + + return 0; +} +#endif |