diff -urpN john-1.7.6-jumbo-12/src/NT_fmt.c john-1.7.6-jumbo-12_nt_scale/src/NT_fmt.c --- john-1.7.6-jumbo-12/src/NT_fmt.c 2011-02-04 12:36:26.000000000 +0000 +++ john-1.7.6-jumbo-12_nt_scale/src/NT_fmt.c 2011-03-24 16:21:55.000000000 +0000 @@ -301,6 +301,16 @@ static int binary_hash_2(void *binary) return ((unsigned int *)binary)[1] & 0x0FFF; } +static int binary_hash_3(void *binary) +{ + return ((unsigned int *)binary)[1] & 0x0FFFF; +} + +static int binary_hash_4(void *binary) +{ + return ((unsigned int *)binary)[1] & 0x0FFFFF; +} + static int get_hash_0(int index) { #if defined(NT_X86_64) @@ -343,6 +353,34 @@ static int get_hash_2(int index) #endif } +static int get_hash_3(int index) +{ +#if defined(NT_X86_64) + return output8x[32*(index>>3)+8+index%8] & 0x0FFFF; +#elif defined(NT_SSE2) + if(index>2)+4+index%4] & 0x0FFFF; + else + return output1x[(index-NT_NUM_KEYS4)*4+1] & 0x0FFFF; +#else + return output1x[(index<<2)+1] & 0x0FFFF; +#endif +} + +static int get_hash_4(int index) +{ +#if defined(NT_X86_64) + return output8x[32*(index>>3)+8+index%8] & 0x0FFFFF; +#elif defined(NT_SSE2) + if(index>2)+4+index%4] & 0x0FFFFF; + else + return output1x[(index-NT_NUM_KEYS4)*4+1] & 0x0FFFFF; +#else + return output1x[(index<<2)+1] & 0x0FFFFF; +#endif +} + static int cmp_all(void *binary, int count) { unsigned int i=0; @@ -643,8 +681,8 @@ struct fmt_main fmt_NT = { binary_hash_0, binary_hash_1, binary_hash_2, - NULL, - NULL + binary_hash_3, + binary_hash_4 }, fmt_default_salt_hash, set_salt, @@ -656,8 +694,8 @@ struct fmt_main fmt_NT = { get_hash_0, get_hash_1, get_hash_2, - NULL, - NULL + get_hash_3, + get_hash_4 }, cmp_all, cmp_one,