git.schokokeks.org
Repositories
Help
Report an Issue
derivepassphrase.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
474934d
Branches
Tags
documentation-tree
master
0.1.0
0.1.1
0.1.2
0.1.3
0.2.0
0.3.0
0.3.1
0.3.2
0.3.3
derivepassphrase.git
src
ssh_agent_client
types.py
Add prototype implementation
Marco Ricci
commited
474934d
at 2024-05-19 00:24:09
types.py
Blame
History
Raw
# SPDX-FileCopyrightText: 2024 Marco Ricci <m@the13thletter.info> # # SPDX-License-Identifier: MIT """Common typing declarations for the parent module.""" from __future__ import annotations import enum from typing import NamedTuple __all__ = ('KeyCommentPair', 'SSH_AGENT', 'SSH_AGENTC') class KeyCommentPair(NamedTuple): """SSH key plus comment pair. For typing purposes. Attributes: key: SSH key. comment: SSH key comment. """ key: bytes | bytearray comment: bytes | bytearray class SSH_AGENTC(enum.Enum): """SSH agent protocol numbers: client requests. Attributes: REQUEST_IDENTITIES: List identities. Expecting `SSH_AGENT.IDENTITIES_ANSWER`. SIGN_REQUEST: Sign data. Expecting `SSH_AGENT.SIGN_RESPONSE`. """ REQUEST_IDENTITIES: int = 11 SIGN_REQUEST: int = 13 class SSH_AGENT(enum.Enum): """SSH agent protocol numbers: server replies. Attributes: IDENTITIES_ANSWER: Successful answer to `SSH_AGENTC.REQUEST_IDENTITIES`. SIGN_RESPONSE: Successful answer to `SSH_AGENTC.SIGN_REQUEST`. """ IDENTITIES_ANSWER: int = 12 SIGN_RESPONSE: int = 14