mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-11-07 00:13:02 +03:00
use random.SystemRandom as random nr source (/dev/urandom)
/dev/urandom is somewhat better than python's PRNG Change-Id: I6de38c14ac6dd55bc84d53974192509c18d02bfa
This commit is contained in:
1 parent
405ccabafd
commit
69218d135f
1 file changed
+1
-1
@@ -121,7 +121,7 @@ class DecimalRangeSource(InputExpandingParamSource):
|
||||
return cls(num_digits=len(first_str), first_value=first_value, last_value=last_value)
|
||||
|
||||
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"""
|
||||
|
||||
Reference in new issue
Block a user