From d272db3ec9d29b6d832ce752325658e149cb5772 Mon Sep 17 00:00:00 2001 From: haohaolee Date: Sat, 29 Dec 2012 20:49:23 +0800 Subject: [PATCH] for pull request md5sum considered as a 64bit integer must follow little endian manner --- encrypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/encrypt.c b/encrypt.c index 44f12628..e82b971f 100755 --- a/encrypt.c +++ b/encrypt.c @@ -1,5 +1,5 @@ #include "encrypt.h" - +#include #include void encrypt(char *buf, int len) { @@ -43,6 +43,7 @@ void get_table(const unsigned char* key) { tmp_hash = MD5((const unsigned char*)key, strlen((const char*)key), NULL); unsigned long long a; a = *(unsigned long long *)tmp_hash; + a = htole64(a); unsigned int i; for(i = 0; i < 256; ++i) {