pub struct Encryptor<'a> { /* private fields */ }Expand description
Enciphers the strings and stream payloads of one indirect object.
Per ISO 32000-1 §7.6.2 the key is derived per object from its number and generation; the generation is always 0 here because that is what the writer emits, which is also what the C++ passes.
Borrowed rather than owned so one handler and one vector source serve a whole save, with only the object number changing per object.
Implementations§
Source§impl<'a> Encryptor<'a>
impl<'a> Encryptor<'a>
Sourcepub const fn new(
handler: &'a SecurityHandler,
ivs: &'a IvSource,
object_number: u32,
) -> Self
pub const fn new( handler: &'a SecurityHandler, ivs: &'a IvSource, object_number: u32, ) -> Self
An encryptor for the object numbered num.
Sourcepub fn encrypts_metadata(&self) -> bool
pub fn encrypts_metadata(&self) -> bool
Whether this document’s metadata stream is enciphered along with
everything else (/EncryptMetadata, default true).
Read by the stream encoder, which owns the exemption; see its docs for why we consult the flag where the C++ writer does not.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Encryptor<'a>
impl<'a> !Send for Encryptor<'a>
impl<'a> !Sync for Encryptor<'a>
impl<'a> !UnwindSafe for Encryptor<'a>
impl<'a> Freeze for Encryptor<'a>
impl<'a> Unpin for Encryptor<'a>
impl<'a> UnsafeUnpin for Encryptor<'a>
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