pub struct EmbeddedFileEncryption { /* private fields */ }Expand description
Embedded file encryption handler
Implementations§
Source§impl EmbeddedFileEncryption
impl EmbeddedFileEncryption
Sourcepub fn new(
eff_filter: Option<String>,
encrypt_metadata: bool,
filter_manager: Arc<CryptFilterManager>,
) -> Self
pub fn new( eff_filter: Option<String>, encrypt_metadata: bool, filter_manager: Arc<CryptFilterManager>, ) -> Self
Create new embedded file encryption handler
Sourcepub fn is_embedded_file(stream_dict: &Dictionary) -> bool
pub fn is_embedded_file(stream_dict: &Dictionary) -> bool
Check if a stream is an embedded file
Sourcepub fn is_metadata(stream_dict: &Dictionary) -> bool
pub fn is_metadata(stream_dict: &Dictionary) -> bool
Check if a stream is metadata
Sourcepub fn get_stream_filter(&self, stream_dict: &Dictionary) -> Option<String>
pub fn get_stream_filter(&self, stream_dict: &Dictionary) -> Option<String>
Get the appropriate filter for a stream
Sourcepub fn encrypt_embedded_file(
&self,
data: &[u8],
obj_id: &ObjectId,
encryption_key: &EncryptionKey,
) -> Result<Vec<u8>>
pub fn encrypt_embedded_file( &self, data: &[u8], obj_id: &ObjectId, encryption_key: &EncryptionKey, ) -> Result<Vec<u8>>
Encrypt embedded file data
Sourcepub fn decrypt_embedded_file(
&self,
data: &[u8],
obj_id: &ObjectId,
encryption_key: &EncryptionKey,
) -> Result<Vec<u8>>
pub fn decrypt_embedded_file( &self, data: &[u8], obj_id: &ObjectId, encryption_key: &EncryptionKey, ) -> Result<Vec<u8>>
Decrypt embedded file data
Sourcepub fn process_stream_encryption(
&self,
stream_dict: &Dictionary,
data: &[u8],
obj_id: &ObjectId,
encryption_key: &EncryptionKey,
encrypt: bool,
) -> Result<Vec<u8>>
pub fn process_stream_encryption( &self, stream_dict: &Dictionary, data: &[u8], obj_id: &ObjectId, encryption_key: &EncryptionKey, encrypt: bool, ) -> Result<Vec<u8>>
Process a stream for encryption, considering embedded files and metadata
Auto Trait Implementations§
impl Freeze for EmbeddedFileEncryption
impl !RefUnwindSafe for EmbeddedFileEncryption
impl Send for EmbeddedFileEncryption
impl Sync for EmbeddedFileEncryption
impl Unpin for EmbeddedFileEncryption
impl !UnwindSafe for EmbeddedFileEncryption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more