def writeDG(self, dg): file = converter.toFID(dg.tag) #File selection self._iso7816.selectFile("00", "00", file, cla="10", ins="A5") self._maxSize = 0xFA #Write binary writed = 0 dgLength = len(dg.file) while writed < dgLength: toSend = dg.file[writed:writed + self._maxSize] self._iso7816.updateBinary(writed, toSend, cla="10", ins="A6") writed += len(toSend) self.log(str(dg.tag) + " sent to JCOP")
def writeDG(self, dg): file = converter.toFID(dg.tag) #File selection self._iso7816.selectFile("00", "00", file, cla="10", ins="A5") self._maxSize = 0xFA #Write binary writed = 0 dgLength = len(dg.file) while writed < dgLength: toSend = dg.file[writed:writed+self._maxSize] self._iso7816.updateBinary(writed, toSend, cla="10", ins="A6") writed += len(toSend) self.log(str(dg.tag) + " sent to JCOP")
def _selectFile(self, tag): self._iso7816.selectFile("02", "0C", converter.toFID(tag))