octomachinery.github.models.private_key module¶
Private key container.
- class octomachinery.github.models.private_key.GitHubPrivateKey(b_raw_data: bytes)[source]¶
Bases:
objectPrivate key entity with a pre-calculated SHA-1 fingerprint.
- Parameters:
b_raw_data (bytes) – the contents of a PEM file
- property fingerprint: str¶
Colon-separated SHA-1 fingerprint string value.
- Returns:
colon-separated SHA-1 fingerprint
- Return type:
- classmethod from_file(path: Path | str) GitHubPrivateKey[source]¶
Construct a
GitHubPrivateKeyinstance.- Returns:
the
GitHubPrivateKeyinstance constructed of the target file contents- Return type:
- octomachinery.github.models.private_key.extract_private_key_sha1_fingerprint(rsa_private_key: PrivateKeyTypes) str[source]¶
Retrieve the private key SHA-1 fingerprint.
- Parameters:
rsa_private_key (cryptography.hazmat.primitives.asymmetric.types.PrivateKeyTypes) – private key object
- Returns:
colon-separated SHA-1 fingerprint
- Return type: