massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / pkey.pyi
1 from typing import IO, Pattern, Type, TypeVar
2
3 from paramiko.message import Message
4
5 OPENSSH_AUTH_MAGIC: bytes = ...
6
7 def _unpad_openssh(data: bytes) -> bytes: ...
8
9 _PK = TypeVar("_PK", bound=PKey)
10
11 class PKey:
12     public_blob: PublicBlob | None
13     BEGIN_TAG: Pattern[str]
14     END_TAG: Pattern[str]
15     def __init__(self, msg: Message | None = ..., data: str | None = ...) -> None: ...
16     def asbytes(self) -> bytes: ...
17     def __cmp__(self, other: object) -> int: ...
18     def __eq__(self, other: object) -> bool: ...
19     def get_name(self) -> str: ...
20     def get_bits(self) -> int: ...
21     def can_sign(self) -> bool: ...
22     def get_fingerprint(self) -> bytes: ...
23     def get_base64(self) -> str: ...
24     def sign_ssh_data(self, data: bytes) -> Message: ...
25     def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...
26     @classmethod
27     def from_private_key_file(cls: Type[_PK], filename: str, password: str | None = ...) -> _PK: ...
28     @classmethod
29     def from_private_key(cls: Type[_PK], file_obj: IO[str], password: str | None = ...) -> _PK: ...
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     def load_certificate(self, value: Message | str) -> None: ...
33
34 class PublicBlob:
35     key_type: str
36     key_blob: str
37     comment: str
38     def __init__(self, type_: str, blob: bytes, comment: str | None = ...) -> None: ...
39     @classmethod
40     def from_file(cls, filename: str) -> PublicBlob: ...
41     @classmethod
42     def from_string(cls, string: str) -> PublicBlob: ...
43     @classmethod
44     def from_message(cls, message: Message) -> PublicBlob: ...
45     def __eq__(self, other: object) -> bool: ...
46     def __ne__(self, other: object) -> bool: ...