function autenticateSession($userName, $sessionName) { // print_r($_SESSION); if (isset($_SESSION['start']) && $_SESSION['start'] != "") { $key = $_SESSION[$userName] . $_COOKIE[$sessionName]; $cypher = new Cypher(); $cypherObj = $cypher->cypherOpen("", ""); $descifrado = $cypher->descypher($cypherObj, $key, $_SESSION['vector'], $_SESSION['start']); if ($descifrado == $this->getIdSession()) { return true; } else { return false; } } }