mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
correctly compute the ICCID (19 digits, including luhn checksum)
This commit is contained in:
committed by
Sylvain Munaut
parent
5dffefbf0c
commit
2c0ff3a167
@@ -31,7 +31,7 @@ class Card(object):
|
||||
self._scc = scc
|
||||
|
||||
def _e_iccid(self, iccid):
|
||||
return swap_nibbles(iccid)
|
||||
return swap_nibbles(rpad(iccid, 20))
|
||||
|
||||
def _e_imsi(self, imsi):
|
||||
"""Converts a string imsi into the value of the EF"""
|
||||
|
||||
Reference in New Issue
Block a user