The yahoo_login function is required for logging into the Yahoo! Messenger(tm) servers. The seed is sent by the server in the form of a challenge string. A good description of the Yahoo! Messenger(tm) protocol is available at http://www.venkydude.com/
PHP Example :
<?php
/*
* $Id: yahoo.crypt.php,v 6.00 2003/05/07 4:45:00 Daeken Exp $
*
* Copyright (C) 2003 by Cody Brocious (daeken_9999 AT yahoo DOT com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
function md5_raw($str)
{
$md5 = md5($str);
$ctx = '';
for ($i = 0; $i < 32; $i += 2)
{
$ctx .= chr(hexdec($md5{$i} . $md5{$i + 1}));
}
return $ctx;
}
function yahoo_login($username, $password, $seed)
{
$sv = $seed[15];
$sv = ord($sv) % 8;
$sv = chr($sv);
$ctx = '';
$ctx .= $password;
$result = md5_raw($ctx);
$password_hash = to_y64($result, 16);