php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61307
Patch 61307-patch.diff revision 2012-03-06 23:59 UTC by me at ktamura dot com

Patch 61307-patch.diff for hash related Bug #61307

Patch version 2012-03-06 23:59 UTC

Return to Bug #61307 | Download this patch
Patch Revisions:

Developer: me@ktamura.com

diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c
index 98adcc5..8ac09f4 100644
--- a/ext/hash/hash_tiger.c
+++ b/ext/hash/hash_tiger.c
@@ -174,7 +174,7 @@ static inline void TigerDigest(unsigned char *digest_str, unsigned int digest_le
 	unsigned int i;
 
 	for (i = 0; i < digest_len; ++i) {
-		digest_str[i] = (unsigned char) ((context->state[i/8] >> (8 * (i%8))) & 0xff);
+		digest_str[i] = (unsigned char) ((context->state[i/8] >> (8 * (7 - i % 8))) & 0xff);
 	}
 }
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 18:01:32 2024 UTC