apple_codesign::cryptography

Trait PrivateKey

Source
pub trait PrivateKey: KeyInfoSigner {
    // Required methods
    fn as_key_info_signer(&self) -> &dyn KeyInfoSigner;
    fn to_public_key_peer_decrypt(
        &self,
    ) -> Result<Box<dyn PublicKeyPeerDecrypt>, AppleCodesignError>;
    fn finish(&self) -> Result<(), AppleCodesignError>;
}
Expand description

A supertrait generically describing a private key capable of signing and possibly decryption.

Required Methods§

Source

fn as_key_info_signer(&self) -> &dyn KeyInfoSigner

Source

fn to_public_key_peer_decrypt( &self, ) -> Result<Box<dyn PublicKeyPeerDecrypt>, AppleCodesignError>

Source

fn finish(&self) -> Result<(), AppleCodesignError>

Signals the end of operations on the private key.

Implementations can use this to do things like destroy private key matter, disconnect from a hardware device, etc.

Implementors§