public function validateToken($token)
    {
        if (!is_string($token)) {
            return false;
        }

        $token = base64_decode($token, true);

        if (strlen($token) !== self::TOKEN_LENGTH * 2) {
            return false;
        }

        list($key, $encrypted) = str_split($token, self::TOKEN_LENGTH);

        return call_user_func(
            $this->compare,
            $this->encryptToken($this->getTrueToken(), $key),
            $encrypted
        );
    }
public function validateToken($token)
    {
        if (!is_string($token)) {
            return false;
        }

        $token = base64_decode($token, true);

        if (strlen($token) !== self::TOKEN_LENGTH * 2) {
            return false;
        }

        list($key, $encrypted) = str_split($token, self::TOKEN_LENGTH);

        return call_user_func(
            $this->compare,
            $this->encryptToken($this->getTrueToken(), $key),
            $encrypted
        );
    }
public function validateToken ( $ token ) { if ( ! is_string ( $ token ) ) { return false ; } $ token = base64_decode ( $ token , true ) ; if ( strlen ( $ token ) !== self :: TOKEN_LENGTH * 2 ) { return false ; } list ( $ key , $ encrypted ) = str_split ( $ token , self :: TOKEN_LENGTH ) ; return call_user_func ( $ this -> compare , $ this -> encryptToken ( $ this -> getTrueToken ( ) , $ key ) , $ encrypted ) ; }
Validates the csrf token.

The token must be provided as a base64 encoded string which also includes
the token encryption key. In other words, you should pass this method the
exact same string that has been returned by the `getToken()` method.

@param string $token The base64 encoded token provided by getToken()
@return bool True if the token is valid, false if it is not
@throws Storage\TokenStorageException If the secret token cannot be loaded or stored
Validates the csrf token .