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)
274 randbelow = self._randbelow277 j = randbelow(i+1)318 randbelow = self._randbelow330 j = randbelow(n-i)337 j = randbelow(n)339 j = randbelow(n)
27 def randbelow(exclusive_upper_bound): function
49 .. function:: randbelow(n)
509 Fixed bug in secrets.randbelow() which would hang when given a negative