Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
    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")
Exemplo n.º 3
0
 def _selectFile(self, tag):
     self._iso7816.selectFile("02", "0C", converter.toFID(tag))
Exemplo n.º 4
0
 def _selectFile(self, tag):
     self._iso7816.selectFile("02", "0C", converter.toFID(tag))