Skip to main content

ContentDecryptionKey

Trait ContentDecryptionKey 

Source
pub trait ContentDecryptionKey: Send + Sync {
    // Required methods
    fn provider_binding(&self) -> &ProviderBinding;
    fn key_len(&self) -> usize;
    fn decrypt_with_provider(
        &self,
        provider: &dyn CryptoProvider,
        algorithm: DataEncryptionAlgorithm,
        ciphertext: &[u8],
    ) -> Result<Vec<u8>, ProviderError>;
}
Expand description

Non-exportable symmetric key used for content decryption.

Required Methods§

Source

fn provider_binding(&self) -> &ProviderBinding

Exact external domain owning this handle.

Source

fn key_len(&self) -> usize

Public key width in bytes.

Source

fn decrypt_with_provider( &self, provider: &dyn CryptoProvider, algorithm: DataEncryptionAlgorithm, ciphertext: &[u8], ) -> Result<Vec<u8>, ProviderError>

Execute within the selected provider’s execution domain.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§