-
MD5 Thing
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) */
*edit
maybe this link will help:
http://www.rabbitsemiconductor.com/d...N209/TN209.pdf
i do not understand their definition of what the functions does
-
looks like it initializes an md5 hash to a certain state, adds the authkey, password, and "AOL Instant Messenger (SM)" to it, then finishes it... dunno how... maybe it's putting it into auth_hash because the next line of code implies that after it does that little dance it has an array ready to send to the server...?
btw, I didn't check the PDF... PDF links are on my s-list for now.
-
Ah, found out what it does
It just does this in PHP
Code:
<?php
md5($key . $password . "AOL Instant Messenger (SM)");
?>
Adds the strings together then does md5 crap on it all combined