Searched refs:randbelow (Results 1 – 5 of 5) sorted by relevance
71 self.assertIn(secrets.randbelow(i), range(i))72 self.assertRaises(ValueError, secrets.randbelow, 0)73 self.assertRaises(ValueError, secrets.randbelow, -1)
390 randbelow = self._randbelow393 j = randbelow(i + 1)480 randbelow = self._randbelow492 j = randbelow(n - i)499 j = randbelow(n)501 j = randbelow(n)
26 def randbelow(exclusive_upper_bound): function
49 .. function:: randbelow(n)
509 Fixed bug in secrets.randbelow() which would hang when given a negative