ElGamal.pyi 692 B

12345678910111213141516171819
  1. from typing import Callable, Union, Tuple, Optional
  2. __all__ = ['generate', 'construct', 'ElGamalKey']
  3. RNG = Callable[[int], bytes]
  4. def generate(bits: int, randfunc: RNG) -> ElGamalKey: ...
  5. def construct(tup: Union[Tuple[int, int, int], Tuple[int, int, int, int]]) -> ElGamalKey: ...
  6. class ElGamalKey(object):
  7. def __init__(self, randfunc: Optional[RNG]=None) -> None: ...
  8. def has_private(self) -> bool: ...
  9. def can_encrypt(self) -> bool: ...
  10. def can_sign(self) -> bool: ...
  11. def publickey(self) -> ElGamalKey: ...
  12. def __eq__(self, other: object) -> bool: ...
  13. def __ne__(self, other: object) -> bool: ...
  14. def __getstate__(self) -> None: ...