MCPcopy Create free account
hub / github.com/mpdavis/python-jose / is_ssh_key

Function is_ssh_key

jose/utils.py:157–165  ·  view source on GitHub ↗
(key: bytes)

Source from the content-addressed store, hash-verified

155
156
157def is_ssh_key(key: bytes) -> bool:
158 if any(string_value in key for string_value in _SSH_KEY_FORMATS):
159 return True
160 ssh_pubkey_match = _SSH_PUBKEY_RC.match(key)
161 if ssh_pubkey_match:
162 key_type = ssh_pubkey_match.group(1)
163 if _CERT_SUFFIX == key_type[-len(_CERT_SUFFIX) :]:
164 return True
165 return False

Callers 2

__init__Method · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…