massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / packet.pyi
1 import sys
2 from logging import Logger
3 from socket import socket
4 from typing import Any, Callable
5
6 from cryptography.hazmat.primitives.ciphers import Cipher
7 from paramiko.compress import ZlibCompressor, ZlibDecompressor
8 from paramiko.message import Message
9
10 if sys.version_info >= (3, 0):
11     from hashlib import _Hash
12 else:
13     from hashlib import _hash as _Hash
14
15 def compute_hmac(key: bytes, message: bytes, digest_class: _Hash) -> bytes: ...
16
17 class NeedRekeyException(Exception): ...
18
19 def first_arg(e: Exception) -> Any: ...
20
21 class Packetizer:
22     REKEY_PACKETS: int
23     REKEY_BYTES: int
24     REKEY_PACKETS_OVERFLOW_MAX: int
25     REKEY_BYTES_OVERFLOW_MAX: int
26     def __init__(self, socket: socket) -> None: ...
27     @property
28     def closed(self) -> bool: ...
29     def set_log(self, log: Logger) -> None: ...
30     def set_outbound_cipher(
31         self,
32         block_engine: Cipher,
33         block_size: int,
34         mac_engine: _Hash,
35         mac_size: int,
36         mac_key: bytes,
37         sdctr: bool = ...,
38         etm: bool = ...,
39     ) -> None: ...
40     def set_inbound_cipher(
41         self, block_engine: Cipher, block_size: int, mac_engine: _Hash, mac_size: int, mac_key: bytes, etm: bool = ...
42     ) -> None: ...
43     def set_outbound_compressor(self, compressor: ZlibCompressor) -> None: ...
44     def set_inbound_compressor(self, compressor: ZlibDecompressor) -> None: ...
45     def close(self) -> None: ...
46     def set_hexdump(self, hexdump: bool) -> None: ...
47     def get_hexdump(self) -> bool: ...
48     def get_mac_size_in(self) -> int: ...
49     def get_mac_size_out(self) -> int: ...
50     def need_rekey(self) -> bool: ...
51     def set_keepalive(self, interval: int, callback: Callable[[], None]) -> None: ...
52     def read_timer(self) -> None: ...
53     def start_handshake(self, timeout: float) -> None: ...
54     def handshake_timed_out(self) -> bool: ...
55     def complete_handshake(self) -> None: ...
56     def read_all(self, n: int, check_rekey: bool = ...) -> bytes: ...
57     def write_all(self, out: bytes) -> None: ...
58     def readline(self, timeout: float) -> str: ...
59     def send_message(self, data: Message) -> None: ...
60     def read_message(self) -> tuple[int, Message]: ...