protected function passFromSession($macHash, $hash, $time)
    {
        $pass = null;
        $session = $this->getSession();

        if (($hashArray = $session->getVariable('captchaHashes'))) {
            $pass = (isset($hashArray[$macHash][$hash]) && $hashArray[$macHash][$hash] >= $time) ? true : false;
            unset($hashArray[$macHash]);
            if (!empty($hashArray)) {
                $session->setVariable('captchaHashes', $hashArray);
            } else {
                $session->deleteVariable('captchaHashes');
            }
        }

        return $pass;
    }
protected function passFromSession($macHash, $hash, $time)
    {
        $pass = null;
        $session = $this->getSession();

        if (($hashArray = $session->getVariable('captchaHashes'))) {
            $pass = (isset($hashArray[$macHash][$hash]) && $hashArray[$macHash][$hash] >= $time) ? true : false;
            unset($hashArray[$macHash]);
            if (!empty($hashArray)) {
                $session->setVariable('captchaHashes', $hashArray);
            } else {
                $session->deleteVariable('captchaHashes');
            }
        }

        return $pass;
    }
protected function passFromSession ( $ macHash , $ hash , $ time ) { $ pass = null ; $ session = $ this -> getSession ( ) ; if ( ( $ hashArray = $ session -> getVariable ( 'captchaHashes' ) ) ) { $ pass = ( isset ( $ hashArray [ $ macHash ] [ $ hash ] ) && $ hashArray [ $ macHash ] [ $ hash ] >= $ time ) ? true : false ; unset ( $ hashArray [ $ macHash ] ) ; if ( ! empty ( $ hashArray ) ) { $ session -> setVariable ( 'captchaHashes' , $ hashArray ) ; } else { $ session -> deleteVariable ( 'captchaHashes' ) ; } } return $ pass ; }
Checks for session captcha hash validity

@param string $macHash hash key
@param string $hash    captcha hash
@param int    $time    check time

@return bool
Checks for session captcha hash validity