aboutsummaryrefslogtreecommitdiffstats
path: root/pySim
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-12-07 12:34:13 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-12-08 19:39:49 +0100
commit2c0ff3a1677a232f2617b5aba1a1002f16e7c7d3 (patch)
tree269319e149bd2cff51dc3c736a27b11a0112a0de /pySim
parent5dffefbf0c49340033c0854b592a2741da0935a0 (diff)
correctly compute the ICCID (19 digits, including luhn checksum)
Diffstat (limited to 'pySim')
-rw-r--r--pySim/cards.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index 3ceaa63..8f7fda7 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -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"""