Primality.pyi 841 B

12345678910111213141516171819
  1. from typing import Callable, Optional, Union, Set
  2. PrimeResult = int
  3. COMPOSITE: PrimeResult
  4. PROBABLY_PRIME: PrimeResult
  5. def miller_rabin_test(candidate: int, iterations: int, randfunc: Optional[Callable[[int],bytes]]=None) -> PrimeResult: ...
  6. def lucas_test(candidate: int) -> PrimeResult: ...
  7. _sieve_base: Set[int]
  8. def test_probable_prime(candidate: int, randfunc: Optional[Callable[[int],bytes]]=None) -> PrimeResult: ...
  9. def generate_probable_prime(*,
  10. exact_bits: int = ...,
  11. randfunc: Callable[[int],bytes] = ...,
  12. prime_filter: Callable[[int],bool] = ...) -> int: ...
  13. def generate_probable_safe_prime(*,
  14. exact_bits: int = ...,
  15. randfunc: Callable[[int],bytes] = ...) -> int: ...