Add some notes to the smd5_compare() function

This commit is contained in:
Miles Lott 2004-02-05 02:14:31 +00:00
parent dfa356e0c6
commit 6adc7fda6f

View File

@ -207,7 +207,7 @@
/**
@function smd5_compare
@abstract compare SHA-encrypted passwords for authentication
@abstract compare SMD5-encrypted passwords for authentication
@param $form_val user input value for comparison
@param $db_val stored value (from database)
@return boolean True on successful comparison
@ -216,6 +216,8 @@
{
/* Start with the first char after {SMD5} */
$hash = base64_decode(substr($db_val,6));
/* SMD5 hashes are 16 bytes long */
$orig_hash = substr($hash, 0, 16);
$salt = substr($hash, 16);