def _get_crc(self): data = self.apdu + bytes([ETX]) try: return crc_xmodem16(data) except Exception: print(self.apdu) raise
def _get_crc(self): data = conv.hl2bs(self.apdu + [ETX]) #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data))) try: return crc.crc_xmodem16(data) except: print(self.apdu) raise
def _get_crc(self): data = conv.hl2bs(self.apdu + [ ETX ]) #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data))) try: return crc.crc_xmodem16(data) except: print self.apdu raise