def reset(self, test_sync = True):
        """
        Perform stream resynchronization.

        @param test_sync: Verify sync with YubiHSM after reset
        @type test_sync: bool

        @return: True if successful
        @rtype: bool
        """
        pyhsm.cmd.reset(self.stick)
        if test_sync:
            # Now verify we are in sync
            data = 'ekoeko'
            echo = self.echo(data)
            # XXX analyze 'echo' to see if we are in config mode, and produce a
            # nice exception if we are.
            return data == echo
        else:
            return True
Perform stream resynchronization.

        @param test_sync: Verify sync with YubiHSM after reset
        @type test_sync: bool

        @return: True if successful
        @rtype: bool