From 6adc7fda6f67433e1be90768306ef522654b90fe Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Thu, 5 Feb 2004 02:14:31 +0000 Subject: [PATCH] Add some notes to the smd5_compare() function --- phpgwapi/inc/class.auth.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php index eafa80621d..817cd9b24f 100644 --- a/phpgwapi/inc/class.auth.inc.php +++ b/phpgwapi/inc/class.auth.inc.php @@ -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);