pub struct StandardSecurityHandler { /* private fields */ }Implementations§
Source§impl StandardSecurityHandler
impl StandardSecurityHandler
Sourcepub fn open(
encrypt_dict: &PdfDictionary,
id_first: &[u8],
password: &[u8],
) -> PdfResult<Option<Self>>
pub fn open( encrypt_dict: &PdfDictionary, id_first: &[u8], password: &[u8], ) -> PdfResult<Option<Self>>
Builds a decryption handler from the /Encrypt dictionary and the
trailer’s first /ID string, authenticating the supplied password.
Returns None if the password does not authenticate.
Sourcepub fn encrypts_metadata(&self) -> bool
pub fn encrypts_metadata(&self) -> bool
Returns true when this handler was configured with
/EncryptMetadata false. Parser uses this to skip
/Type /Metadata streams.
Sourcepub fn decrypt_bytes(
&self,
bytes: &[u8],
object_ref: ObjectRef,
kind: BytesKind,
) -> PdfResult<Vec<u8>>
pub fn decrypt_bytes( &self, bytes: &[u8], object_ref: ObjectRef, kind: BytesKind, ) -> PdfResult<Vec<u8>>
Decrypts bytes produced for the indirect object (num, gen).
The crypt method is chosen per kind — strings use /StrF,
streams use /StmF. Returns the ciphertext unchanged for
/Identity filters; returns an error for malformed AES input
(wrong length, bad PKCS#7 padding).
Trait Implementations§
Source§impl Clone for StandardSecurityHandler
impl Clone for StandardSecurityHandler
Source§fn clone(&self) -> StandardSecurityHandler
fn clone(&self) -> StandardSecurityHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StandardSecurityHandler
impl RefUnwindSafe for StandardSecurityHandler
impl Send for StandardSecurityHandler
impl Sync for StandardSecurityHandler
impl Unpin for StandardSecurityHandler
impl UnsafeUnpin for StandardSecurityHandler
impl UnwindSafe for StandardSecurityHandler
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