diff options
author | Harald Welte <laforge@osmocom.org> | 2021-05-24 23:19:30 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2021-06-13 22:31:05 +0200 |
commit | f2011669995eecde5c5e88606dfc9d097efb4b7c (patch) | |
tree | 697a33b6e1df07c80489a6f41c3bc7baa00cda00 | |
parent | 14105dce993140246e43a5f1d6d81e4693e54cca (diff) |
pySim/commands: Add envelope() method for ENVELOPE command
Change-Id: I2b5b6585ecbe00b54919b197428fe09a220757c6
-rw-r--r-- | pySim/commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pySim/commands.py b/pySim/commands.py index 1fbea16..76b7cd5 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -425,3 +425,7 @@ class SimCardCommands(object): data, sw = self._tp.send_apdu(self.cla_byte + '2800' + ('%02X' % chv_no) + '08' + fc) self._chv_process_sw('enable', chv_no, pin_code, sw) return (data, sw) + + def envelope(self, payload:str): + """Send one ENVELOPE command to the SIM""" + return self._tp.send_apdu_checksw('80c20000%02x%s' % (len(payload)//2, payload)) |