src/protocols/yahoo/yahoo_auth.c

changeset 11644
939411169d01
parent 9382
d05b4c47758d
equal deleted inserted replaced
11643:f04408721780 11644:939411169d01
728 728
729 if (outer_loop > 1) { 729 if (outer_loop > 1) {
730 auth_function_t *ft; 730 auth_function_t *ft;
731 731
732 int remainder; 732 int remainder;
733 733
734 hash = ((((hash ^ (hash >> 0x8)) >> 0x10) ^ hash) ^ (hash >> 0x8)) & 0xff; 734 hash = ((((hash ^ (hash >> 0x8)) >> 0x10) ^ hash) ^ (hash >> 0x8)) & 0xff;
735 735
736 remainder = hash % divisor; 736 remainder = hash % divisor;
737 737
738 outer_loop--; 738 outer_loop--;
819 { 819 {
820 unsigned int final_value = 0; 820 unsigned int final_value = 0;
821 821
822 int i; 822 int i;
823 823
824 /* Run through each bit. 824 /* Run through each bit. */
825 */
826 825
827 for (i = 0; i < 32; i++) 826 for (i = 0; i < 32; i++)
828 { 827 {
829 unsigned char buffer = yahoo_auth_read45(initial, i); /* Find the location in the challenge to put the 1/0 bit */ 828 unsigned char buffer = yahoo_auth_read45(initial, i); /* Find the location in the challenge to put the 1/0 bit */
830 int mask = ~(1 << buffer); /* so that we can do a replace of our current value. */ 829 int mask = ~(1 << buffer); /* so that we can do a replace of our current value. */
874 ******************************************************************************/ 873 ******************************************************************************/
875 874
876 unsigned int yahoo_auth_finalCountdown(unsigned int challenge, int divisor, int inner_loop, int outer_loop) 875 unsigned int yahoo_auth_finalCountdown(unsigned int challenge, int divisor, int inner_loop, int outer_loop)
877 { 876 {
878 auth_function_t *ft; 877 auth_function_t *ft;
879 878
880 int remainder = challenge % divisor; 879 int remainder = challenge % divisor;
881 880
882 ft = &main_function_list[inner_loop][remainder]; 881 ft = &main_function_list[inner_loop][remainder];
883 882
884 if (ft) { 883 if (ft) {

mercurial