correctly compute the ICCID (19 digits, including luhn checksum)

This commit is contained in:
Harald Welte authored and Sylvain Munaut committed 2011-12-08 19:39:49 +01:00
1 parent 5dffefbf0c
commit 2c0ff3a167
2 files changed
+12 -5

No files matched your search

+1 -1
View File
@@ -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"""