Encrypts a buffer of data with CTR mode. Multiple successive buffers
        (beinting to the same logical stream of buffers) can be encrypted
        with this method one after the other without any intermediate work.

def encryptCTR(self, data):
        """
        Encrypts a buffer of data with CTR mode. Multiple successive buffers
        (beinting to the same logical stream of buffers) can be encrypted
        with this method one after the other without any intermediate work.
        """
        if type(data) != types.StringType:
            raise RuntimeException("Can only work on 8-bit strings")
        result = []
        for ch in data:
            result.append(chr(ord(ch) ^ self._nextCTRByte()))
        return "".join(result)