ts_102_222: Implement support for RESIZE FILE for an EF
This adds pySim-shell support for the RESIZE FILE command in order
to change the size of linear fixed or transparent EF.
Change-Id: I03fbb683e26231c75f345330ac5f914ac88bbe7a
diff --git a/pySim/commands.py b/pySim/commands.py
index fa0458a..d123e67 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -457,6 +457,10 @@
"""Execute CREEATE FILE command as per TS 102 222 Section 6.3"""
return self._tp.send_apdu_checksw(self.cla_byte + 'e00000%02x%s' % (len(payload)//2, payload))
+ def resize_file(self, payload: Hexstr):
+ """Execute RESIZE FILE command as per TS 102 222 Section 6.10"""
+ return self._tp.send_apdu_checksw('80d40000%02x%s' % (len(payload)//2, payload))
+
def delete_file(self, fid):
"""Execute DELETE FILE command as per TS 102 222 Section 6.4"""
return self._tp.send_apdu_checksw(self.cla_byte + 'e4000002' + fid)