pub struct EncryptionDict {Show 14 fields
pub filter: Vec<u8>,
pub v: i64,
pub length: i64,
pub r: i64,
pub o: Vec<u8>,
pub u: Vec<u8>,
pub p: i32,
pub encrypt_metadata: bool,
pub oe: Option<Vec<u8>>,
pub ue: Option<Vec<u8>>,
pub perms: Option<Vec<u8>>,
pub cf: Option<CryptFilterMap>,
pub stm_f: Option<Vec<u8>>,
pub str_f: Option<Vec<u8>>,
}Expand description
Parsed encryption dictionary from the PDF trailer.
Fields§
§filter: Vec<u8>/Filter — usually “Standard”
v: i64/V — algorithm version (0, 1, 2, 3, 4, 5)
length: i64/Length — key length in bits (default 40)
r: i64/R — revision of the Standard handler (2, 3, 4, 5, 6)
o: Vec<u8>/O — owner password hash (32 or 48 bytes)
u: Vec<u8>/U — user password hash (32 or 48 bytes)
p: i32/P — permission flags (signed 32-bit)
encrypt_metadata: bool/EncryptMetadata — default true
oe: Option<Vec<u8>>/OE — owner encryption key (R=5/6, 32 bytes)
ue: Option<Vec<u8>>/UE — user encryption key (R=5/6, 32 bytes)
perms: Option<Vec<u8>>/Perms — permissions validation (R=6, 16 bytes)
cf: Option<CryptFilterMap>/CF — crypt filter map
stm_f: Option<Vec<u8>>/StmF — default stream crypt filter name
str_f: Option<Vec<u8>>/StrF — default string crypt filter name
Implementations§
Source§impl EncryptionDict
Serialize an EncryptionDict back to a PdfDict (for writing encrypted PDFs).
impl EncryptionDict
Serialize an EncryptionDict back to a PdfDict (for writing encrypted PDFs).
pub fn to_pdf_dict(&self) -> PdfDict
Trait Implementations§
Source§impl Clone for EncryptionDict
impl Clone for EncryptionDict
Source§fn clone(&self) -> EncryptionDict
fn clone(&self) -> EncryptionDict
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 EncryptionDict
impl RefUnwindSafe for EncryptionDict
impl Send for EncryptionDict
impl Sync for EncryptionDict
impl Unpin for EncryptionDict
impl UnsafeUnpin for EncryptionDict
impl UnwindSafe for EncryptionDict
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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