signer

class satcfdi.models.signer.Signer(certificate: X509, key: RSAPrivateKey, check=True)[source]

Bases: Certificate

classmethod load(certificate: bytes, key: bytes, password: str | bytes = None, check=True) Signer[source]
classmethod load_pkcs12(data: bytes, password: str | bytes = None) Signer[source]
sign_sha1(data) str[source]
sign_sha256(data) str[source]
key_bytes(password: str | bytes = None, encoding: ~cryptography.hazmat.primitives._serialization.Encoding = <Encoding.DER: 'DER'>) bytes[source]

Returns the private key in bytes :param password: The password to decrypt the private key. Defaults to None. :type password: str | bytes, optional :param encoding: The encoding format of the private key. Defaults to “DER”. :type encoding: cryptography.hazmat.primitives.serialization.Encoding, optional

Returns:

The private key in bytes

Return type:

bytes

pcks12_bytes(password: str | bytes = None) bytes[source]
decrypt(data: bytes)[source]