Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/starkbank_ecdsa-2.2.0-py3.11.egg/ellipticcurve/utils/integer.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

5 statements  

1from random import SystemRandom 

2 

3 

4class RandomInteger: 

5 

6 @classmethod 

7 def between(cls, min, max): 

8 """ 

9 Return integer x in the range: min <= x <= max 

10 

11 :param min: minimum value of the integer 

12 :param max: maximum value of the integer 

13 :return: 

14 """ 

15 

16 return SystemRandom().randrange(min, max + 1)