Debian Codegraph @

lib/Crypto/Math/_IntegerBase.pyi

raw symbols SCIP
1 from typing import Optional, Union, Callable
2
3 RandFunc = Callable[[int],int]
4
5 class IntegerBase:
6
7 def __init__(self, value: Union[IntegerBase, int]): ...
8
9 def __int__(self) -> int: ...
10 def __str__(self) -> str: ...
11 def __repr__(self) -> str: ...
12 def to_bytes(self, block_size: Optional[int]=0, byteorder: str= ...) -> bytes: ...
13 @staticmethod
14 def from_bytes(byte_string: bytes, byteorder: Optional[str] = ...) -> IntegerBase: ...
15 def __eq__(self, term: object) -> bool: ...
16 def __ne__(self, term: object) -> bool: ...
17 def __lt__(self, term: Union[IntegerBase, int]) -> bool: ...
18 def __le__(self, term: Union[IntegerBase, int]) -> bool: ...
19 def __gt__(self, term: Union[IntegerBase, int]) -> bool: ...
20 def __ge__(self, term: Union[IntegerBase, int]) -> bool: ...
21 def __nonzero__(self) -> bool: ...
22 def is_negative(self) -> bool: ...
23 def __add__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
24 def __sub__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
25 def __mul__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
26 def __floordiv__(self, divisor: Union[IntegerBase, int]) -> IntegerBase: ...
27 def __mod__(self, divisor: Union[IntegerBase, int]) -> IntegerBase: ...
28 def inplace_pow(self, exponent: int, modulus: Optional[Union[IntegerBase, int]]=None) -> IntegerBase: ...
29 def __pow__(self, exponent: int, modulus: Optional[int]) -> IntegerBase: ...
30 def __abs__(self) -> IntegerBase: ...
31 def sqrt(self, modulus: Optional[int]) -> IntegerBase: ...
32 def __iadd__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
33 def __isub__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
34 def __imul__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
35 def __imod__(self, divisor: Union[IntegerBase, int]) -> IntegerBase: ...
36 def __and__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
37 def __or__(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
38 def __rshift__(self, pos: Union[IntegerBase, int]) -> IntegerBase: ...
39 def __irshift__(self, pos: Union[IntegerBase, int]) -> IntegerBase: ...
40 def __lshift__(self, pos: Union[IntegerBase, int]) -> IntegerBase: ...
41 def __ilshift__(self, pos: Union[IntegerBase, int]) -> IntegerBase: ...
42 def get_bit(self, n: int) -> bool: ...
43 def is_odd(self) -> bool: ...
44 def is_even(self) -> bool: ...
45 def size_in_bits(self) -> int: ...
46 def size_in_bytes(self) -> int: ...
47 def is_perfect_square(self) -> bool: ...
48 def fail_if_divisible_by(self, small_prime: Union[IntegerBase, int]) -> None: ...
49 def multiply_accumulate(self, a: Union[IntegerBase, int], b: Union[IntegerBase, int]) -> IntegerBase: ...
50 def set(self, source: Union[IntegerBase, int]) -> IntegerBase: ...
51 def inplace_inverse(self, modulus: Union[IntegerBase, int]) -> IntegerBase: ...
52 def inverse(self, modulus: Union[IntegerBase, int]) -> IntegerBase: ...
53 def gcd(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
54 def lcm(self, term: Union[IntegerBase, int]) -> IntegerBase: ...
55 @staticmethod
56 def jacobi_symbol(a: Union[IntegerBase, int], n: Union[IntegerBase, int]) -> IntegerBase: ...
57 @staticmethod
58 def _tonelli_shanks(n: Union[IntegerBase, int], p: Union[IntegerBase, int]) -> IntegerBase : ...
59 @classmethod
60 def random(cls, **kwargs: Union[int,RandFunc]) -> IntegerBase : ...
61 @classmethod
62 def random_range(cls, **kwargs: Union[int,RandFunc]) -> IntegerBase : ...
63 @staticmethod
64 def _mult_modulo_bytes(term1: Union[IntegerBase, int],
65 term2: Union[IntegerBase, int],
66 modulus: Union[IntegerBase, int]) -> bytes: ...
67