def _worker_process(self):
        # type: (CryptoOffload) -> None
        """Crypto worker
        :param CryptoOffload self: this
        """
        while not self.terminated:
            try:
                inst = self._task_queue.get(True, 0.1)
            except queue.Empty:
                continue
            # UNUSED due to AES256-CBC FullBlob mode
            if inst[0] == CryptoAction.Encrypt:  # noqa
                local_file, offsets, symkey, iv = \
                    inst[1], inst[2], inst[3], inst[4]
                with open(local_file, 'rb') as fd:
                    data = fd.read()
                encdata = blobxfer.operations.crypto.aes_cbc_encrypt_data(
                    symkey, iv, data, offsets.pad)
                with tempfile.NamedTemporaryFile(
                        mode='wb', delete=False) as fd:
                    fpath = fd.name
                    fd.write(encdata)
                self._done_cv.acquire()
                self._done_queue.put(fpath)
            elif inst[0] == CryptoAction.Decrypt:
                final_path, internal_fdstart, offsets, symkey, iv, \
                    hmac_datafile = \
                    inst[1], inst[2], inst[3], inst[4], inst[5], inst[6]
                # read encrypted data from disk
                with open(hmac_datafile, 'rb') as fd:
                    encdata = fd.read()
                data = blobxfer.operations.crypto.aes_cbc_decrypt_data(
                    symkey, iv, encdata, offsets.unpad)
                # write decrypted data to disk
                if len(data) > 0:
                    with open(final_path, 'r+b') as fd:
                        fd.seek(internal_fdstart + offsets.fd_start, 0)
                        fd.write(data)
                self._done_cv.acquire()
                self._done_queue.put((final_path, offsets))
            # notify and release condition var
            self._done_cv.notify()
            self._done_cv.release()
Crypto worker
        :param CryptoOffload self: this