User Control Panel
|
|
|
 |
Advertisements
|
 |
|
|
|
HELP US, HELP YOU!
|
| Author |
Message |
digitaltsai Newbie

Joined: 12 Apr 2006 Posts: 3
 
|
Posted: Wed Apr 12, 2006 10:16 pm Post subject: Sign On MD5 Password |
|
|
Can someone please explain to me what this means
It would be nice if someone could translate it to PHP
PHP only has a md5() function
| Code: | #define AIM_MD5_STRING "AOL Instant Messenger (SM)"
/* calculate md5-hash to send to server */
md5_init(&state);
md5_append(&state, (const md5_byte_t *)authkey, strlen(authkey));
md5_append(&state, (const md5_byte_t *)passwd, strlen(passwd));
md5_append(&state, (const md5_byte_t *)AIM_MD5_STRING, strlen(AIM_MD5_STRING));
md5_finish(&state, (md5_byte_t *)auth_hash);
/* Now we ready send to server auth_hash array (16 bytes long) */ |
|
|
| Back to top |
|
 |
ERijkee Newbie

Joined: 05 Jul 2004 Posts: 31 Location: Almere, The Netherlands
    
|
Posted: Sat Jun 10, 2006 5:59 am Post subject: |
|
|
You can get the same output in PHP by setting the second parameter to true.
Not sure if this works:
| Code: | $auth_str = $authkey.$passwd.$AIM_MD5_STRING
$auth_hash = md5($auth_str,true);
|
PHP is just simpler  |
|
| Back to top |
|
 |
|
|