comparison src/protocols/yahoo/yahoo.c @ 8482:791c05d1679d

[gaim-migrate @ 9215] This reportedly makes Yahoo auth work on architectures that aren't suck-endian. Thanks, Andrew Wellington. And while I'm thanking people, thanks to Matt Hyclak for helping me test this and many other patches... committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 22 Mar 2004 01:54:18 +0000
parents ea999c4a9a11
children 4c3ec649fd7d
comparison
equal deleted inserted replaced
8481:6d0869404696 8482:791c05d1679d
1301 1301
1302 /* First four bytes are magic key. 1302 /* First four bytes are magic key.
1303 */ 1303 */
1304 1304
1305 memcpy(&magic_key_char[0], comparison_src, 4); 1305 memcpy(&magic_key_char[0], comparison_src, 4);
1306 memcpy(&magic_4, comparison_src, 4); 1306 magic_4 = magic_key_char[0] | (magic_key_char[1]<<8) | (magic_key_char[2]<<16) | (magic_key_char[3]<<24);
1307 1307
1308 /* 1308 /*
1309 * Magic: Phase 4. Determine what function to use later by getting outside/inside 1309 * Magic: Phase 4. Determine what function to use later by getting outside/inside
1310 * loop values until we match our previous buffer. 1310 * loop values until we match our previous buffer.
1311 */ 1311 */
1354 */ 1354 */
1355 1355
1356 updated_key = yahoo_auth_finalCountdown(magic_4, 0x60, y, x); 1356 updated_key = yahoo_auth_finalCountdown(magic_4, 0x60, y, x);
1357 updated_key = yahoo_auth_finalCountdown(updated_key, 0x60, y, x); 1357 updated_key = yahoo_auth_finalCountdown(updated_key, 0x60, y, x);
1358 1358
1359 memcpy(&magic_key_char[0], &updated_key, 4); 1359 magic_key_char[0] = updated_key & 0xff;
1360 magic_key_char[1] = (updated_key >> 8) & 0xff;
1361 magic_key_char[2] = (updated_key >> 16) & 0xff;
1362 magic_key_char[3] = (updated_key >> 24) & 0xff;
1360 } 1363 }
1361 1364
1362 /* Get password and crypt hashes as per usual. 1365 /* Get password and crypt hashes as per usual.
1363 */ 1366 */
1364 1367