mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
utils: specify paremeters of enc_plmn() as Hexstr
To prevent missunderstandings when using enc_plmn(), specify the input and return parameters as Hexstr. Change-Id: I57cf8e2de357650aef2a06fbffc7615ccb2a45b4 Related: OS#4963
This commit is contained in:
@@ -134,7 +134,7 @@ def dec_iccid(ef:Hexstr) -> str:
|
||||
def enc_iccid(iccid:str) -> Hexstr:
|
||||
return swap_nibbles(rpad(iccid, 20))
|
||||
|
||||
def enc_plmn(mcc, mnc):
|
||||
def enc_plmn(mcc:Hexstr, mnc:Hexstr) -> Hexstr:
|
||||
"""Converts integer MCC/MNC into 3 bytes for EF"""
|
||||
if len(mnc) == 2:
|
||||
mnc += "F" # pad to 3 digits if needed
|
||||
|
||||
Reference in New Issue
Block a user