diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 12:59:03 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 12:59:03 +0000 |
commit | 660b569b0980fc8f71b03ed666dd02eec8388b4c (patch) | |
tree | 8ad02b5f0bebdd4cd1d2ba01005d6f3f71a0a7fb /src/htsmd5.c | |
parent | 64cc4a88da8887ef1f7f4d90be0158d2cc76222d (diff) |
httrack 3.41.2
Diffstat (limited to 'src/htsmd5.c')
-rw-r--r-- | src/htsmd5.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/htsmd5.c b/src/htsmd5.c index adbdb67..114ae7a 100644 --- a/src/htsmd5.c +++ b/src/htsmd5.c @@ -42,12 +42,13 @@ Please visit our Website: http://www.httrack.com /* Internal engine bytecode */ #define HTS_INTERNAL_BYTECODE -#include "htsmd5.h" -#include "md5.h" #include <string.h> #include <stdio.h> +#include <stdlib.h> +#include "htsmd5.h" +#include "md5.h" -int domd5mem(const unsigned char * buf, int len, +int domd5mem(const unsigned char * buf, size_t len, unsigned char * digest, int asAscii) { int endian = 1; unsigned char bindigest[16]; @@ -56,7 +57,7 @@ int domd5mem(const unsigned char * buf, int len, MD5_CTX ctx; MD5Init(&ctx, * ( (char*) &endian)); - MD5Update(&ctx, buf, len); + MD5Update(&ctx, buf, (unsigned int) len); MD5Final(bindigest, &ctx); #else /* Broken md5.. temporary hack */ @@ -87,7 +88,6 @@ int domd5mem(const unsigned char * buf, int len, unsigned long int md5sum32(const char* buff) { unsigned char md5digest[16]; - unsigned char* md5digest_ = md5digest; - domd5mem(buff,strlen(buff),md5digest,0); + domd5mem(buff,(int)strlen(buff),md5digest,0); return *( (long int*)(char*)md5digest ); } |