From 93014f67ff30dc0be7a54c5ceeafa6c5ae0ddb1d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 5 Aug 2025 00:20:21 +0200 Subject: [PATCH] use random.SystemRandom as random nr source (/dev/urandom) /dev/urandom is somewhat better than python's PRNG Change-Id: I6de38c14ac6dd55bc84d53974192509c18d02bfa --- pySim/esim/saip/param_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/esim/saip/param_source.py b/pySim/esim/saip/param_source.py index 79424fd1..9c88537c 100644 --- a/pySim/esim/saip/param_source.py +++ b/pySim/esim/saip/param_source.py @@ -124,7 +124,7 @@ class DecimalRangeSource(InputExpandingParamSource): return "%0*d" % (self.num_digits, val) # pylint: disable=consider-using-f-string class RandomSourceMixin: - random_impl = random # TODO secure random source? + random_impl = random.SystemRandom() class RandomDigitSource(DecimalRangeSource, RandomSourceMixin): """return a different sequence of random decimal digits each"""