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
        );
    }