def __init__(self, blob): # self.data = ctypes.c_uint8 * int(len(blob)) self.data = ctypes.create_string_buffer(len(blob))