_point.pyi 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from typing import Union, Optional, Tuple
  2. from Crypto.Math.Numbers import Integer
  3. class EccPoint(object):
  4. curve: str
  5. def __init__(self,
  6. x: Union[int, Integer],
  7. y: Union[int, Integer],
  8. curve: Optional[str] = ...) -> None: ...
  9. def set(self, point: EccPoint) -> EccPoint: ...
  10. def __eq__(self, point: object) -> bool: ...
  11. def __neg__(self) -> EccPoint: ...
  12. def copy(self) -> EccPoint: ...
  13. def is_point_at_infinity(self) -> bool: ...
  14. def point_at_infinity(self) -> EccPoint: ...
  15. @property
  16. def x(self) -> int: ...
  17. @property
  18. def y(self) -> int: ...
  19. @property
  20. def xy(self) -> Tuple[int, int]: ...
  21. def size_in_bytes(self) -> int: ...
  22. def size_in_bits(self) -> int: ...
  23. def double(self) -> EccPoint: ...
  24. def __iadd__(self, point: EccPoint) -> EccPoint: ...
  25. def __add__(self, point: EccPoint) -> EccPoint: ...
  26. def __imul__(self, scalar: int) -> EccPoint: ...
  27. def __mul__(self, scalar: int) -> EccPoint: ...
  28. class EccXPoint(object):
  29. curve: str
  30. def __init__(self,
  31. x: Union[int, Integer],
  32. curve: Optional[str] = ...) -> None: ...
  33. def set(self, point: EccXPoint) -> EccXPoint: ...
  34. def __eq__(self, point: object) -> bool: ...
  35. def copy(self) -> EccXPoint: ...
  36. def is_point_at_infinity(self) -> bool: ...
  37. def point_at_infinity(self) -> EccXPoint: ...
  38. @property
  39. def x(self) -> int: ...
  40. def size_in_bytes(self) -> int: ...
  41. def size_in_bits(self) -> int: ...
  42. def __imul__(self, scalar: int) -> EccXPoint: ...
  43. def __mul__(self, scalar: int) -> EccXPoint: ...
  44. def __rmul__(self, left_hand: int) -> EccXPoint: ...