octomachinery.github.models.private_key module#
Private key container.
- class octomachinery.github.models.private_key.GitHubPrivateKey(b_raw_data: bytes)[source]#
Bases:
object
Private 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)[source]#
Construct a
GitHubPrivateKey
instance.- Returns:
the
GitHubPrivateKey
instance constructed of the target file contents- Return type:
- octomachinery.github.models.private_key.extract_private_key_sha1_fingerprint(rsa_private_key)[source]#
Retrieve the private key SHA-1 fingerprint.
- Parameters:
rsa_private_key (cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey) – private key object
- Returns:
colon-separated SHA-1 fingerprint
- Return type: