def parse_result(self, data):
        """ Return True if the public_id in the response matches the one in the request. """
        # typedef struct {
        #   uint8_t numBytes;                   // Number of bytes in buffer now
        # } YSM_BUFFER_LOAD_RESP;
        count = ord(data[0])
        if self.offset == 0:
            # if offset was 0, the buffer was reset and
            # we can verify the length returned
            if count != self.num_bytes:
                raise pyhsm.exception.YHSM_Error("Incorrect number of bytes in buffer (got %i, expected %i)" \
                                               % (self.num_bytes, count))
        return count
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/buffer_cmd.py/YHSM_Cmd_Buffer_Random_Load.parse_result/original