31 || $CostLen > 2) { $Cost = 31; } elseif ($CostLen < 2) { $Cost = '0' . $Cost; } $Salt = '$2y$' . $Cost . '$'; $Length = 22; $Range = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; while ($Length--) { $Salt .= str_shuffle($Range)[0]; } } else { $Salt = ''; } } else { $Salt = (string)$Options['salt']; } return crypt($Password, $Salt); } } if (!function_exists('password_verify')) { function password_verify($Password, $Hash) { return (!empty($Password) && !empty($Hash) && $Hash === crypt($Password, $Hash)); } }