massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / rsakey.pyi
1 from typing import IO, Any, Callable
2
3 from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey, RSAPublicNumbers
4 from paramiko.message import Message
5 from paramiko.pkey import PKey
6
7 class RSAKey(PKey):
8     key: None | RSAPublicKey | RSAPrivateKey
9     public_blob: None
10     def __init__(
11         self,
12         msg: Message | None = ...,
13         data: bytes | None = ...,
14         filename: str | None = ...,
15         password: str | None = ...,
16         key: None | RSAPublicKey | RSAPrivateKey = ...,
17         file_obj: IO[str] | None = ...,
18     ) -> None: ...
19     @property
20     def size(self) -> int: ...
21     @property
22     def public_numbers(self) -> RSAPublicNumbers: ...
23     def asbytes(self) -> bytes: ...
24     def __hash__(self) -> int: ...
25     def get_name(self) -> str: ...
26     def get_bits(self) -> int: ...
27     def can_sign(self) -> bool: ...
28     def sign_ssh_data(self, data: bytes) -> Message: ...
29     def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...
30     def write_private_key_file(self, filename: str, password: str | None = ...) -> None: ...
31     def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
32     @staticmethod
33     def generate(bits: int, progress_func: Callable[..., Any] | None = ...) -> RSAKey: ...