Цитата |
---|
if(strlen($arUser["PASSWORD"]) > 32)
{ $salt = substr($arUser["PASSWORD"], 0, strlen($arUser["PASSWORD"]) - 32); $db_password = substr($arUser["PASSWORD"], -32); } else { $salt = ""; $db_password = $arUser["PASSWORD"]; } if($arParams["PASSWORD_ORIGINAL"] == "Y") $user_password = md5($salt.$arParams["PASSWORD"]); else $user_password = $arParams["PASSWORD"]; |
Код |
---|
*/ private function _comparePasswords( $password, $remote_member ) { $check_pass = $password; switch( REMOTE_PASSWORD_SCHEME ) { case 'md5': $check_pass = md5($password); break; case 'sha1': $check_pass = sha1($password); break; } if ( $check_pass == $remote_member[ REMOTE_FIELD_PASS ] ) { return true; } else { return false; } } /** |