Added paramiko3.2 PKey and PublicBlob methods (#11067)

Addded missing paramiko methods from https://docs.paramiko.org/en/latest/api/keys.html#paramiko.pkey.PKey
This commit is contained in:
dispread
2023-11-24 18:55:21 +01:00
committed by GitHub
parent b1d5f2f8d5
commit d27426488e

View File

@@ -1,3 +1,4 @@
from pathlib import Path
from re import Pattern
from typing import IO, TypeVar
from typing_extensions import Self
@@ -14,14 +15,25 @@ class PKey:
public_blob: PublicBlob | None
BEGIN_TAG: Pattern[str]
END_TAG: Pattern[str]
@staticmethod
def from_path(path: Path | str, passphrase: bytes | None = None) -> PKey: ...
@staticmethod
def from_type_string(key_type: str, key_bytes: bytes) -> PKey: ...
@classmethod
def identifiers(cls) -> list[str]: ...
def __init__(self, msg: Message | None = None, data: str | None = None) -> None: ...
def asbytes(self) -> bytes: ...
def __bytes__(self) -> bytes: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
def get_name(self) -> str: ...
@property
def algorithm_name(self) -> str: ...
def get_bits(self) -> int: ...
def can_sign(self) -> bool: ...
def get_fingerprint(self) -> bytes: ...
@property
def fingerprint(self) -> str: ...
def get_base64(self) -> str: ...
def sign_ssh_data(self, data: bytes, algorithm: str | None = None) -> Message: ...
def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...