[XS] Change in pysim[master]: RandomHexDigitSource: rather return in string format, not bytes
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40826?usp=email ) Change subject: RandomHexDigitSource: rather return in string format, not bytes ...................................................................... RandomHexDigitSource: rather return in string format, not bytes Change-Id: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f --- M pySim/esim/saip/param_source.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/40826/1 diff --git a/pySim/esim/saip/param_source.py b/pySim/esim/saip/param_source.py index 8784261..adda445 100644 --- a/pySim/esim/saip/param_source.py +++ b/pySim/esim/saip/param_source.py @@ -20,6 +20,7 @@ import random import re from pySim.utils import all_subclasses_of +from osmocom.utils import b2h class ParamSourceExn(Exception): pass @@ -153,7 +154,7 @@ def get_next(self, csv_row:dict=None): val = random.randbytes(self.num_digits // 2) # TODO secure random source? - return val + return b2h(val) @classmethod def from_str(cls, s:str): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40826?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f Gerrit-Change-Number: 40826 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
participants (1)
-
neels