pub struct EncryptionDictionary {Show 14 fields
pub filter: String,
pub sub_filter: Option<String>,
pub v: u32,
pub length: Option<u32>,
pub cf: Option<Vec<CryptFilter>>,
pub stm_f: Option<StreamFilter>,
pub str_f: Option<StringFilter>,
pub ef: Option<String>,
pub r: u32,
pub o: Vec<u8>,
pub u: Vec<u8>,
pub p: Permissions,
pub encrypt_metadata: bool,
pub id: Option<Vec<u8>>,
}Expand description
PDF encryption dictionary
Fields§
§filter: StringFilter (always “Standard” for standard security handler)
sub_filter: Option<String>Sub-filter (for public-key security handlers)
v: u32Algorithm version (1-5)
length: Option<u32>Key length in bytes
cf: Option<Vec<CryptFilter>>Crypt filters
stm_f: Option<StreamFilter>Stream filter
str_f: Option<StringFilter>String filter
ef: Option<String>Identity filter
r: u32Revision number
o: Vec<u8>Owner password hash (32 bytes)
u: Vec<u8>User password hash (32 bytes)
p: PermissionsPermissions
encrypt_metadata: boolWhether to encrypt metadata
id: Option<Vec<u8>>Document ID (first element)
Implementations§
Source§impl EncryptionDictionary
impl EncryptionDictionary
Sourcepub fn rc4_40bit(
owner_hash: Vec<u8>,
user_hash: Vec<u8>,
permissions: Permissions,
id: Option<Vec<u8>>,
) -> Self
pub fn rc4_40bit( owner_hash: Vec<u8>, user_hash: Vec<u8>, permissions: Permissions, id: Option<Vec<u8>>, ) -> Self
Create RC4 40-bit encryption dictionary
Sourcepub fn rc4_128bit(
owner_hash: Vec<u8>,
user_hash: Vec<u8>,
permissions: Permissions,
id: Option<Vec<u8>>,
) -> Self
pub fn rc4_128bit( owner_hash: Vec<u8>, user_hash: Vec<u8>, permissions: Permissions, id: Option<Vec<u8>>, ) -> Self
Create RC4 128-bit encryption dictionary
Sourcepub fn to_dict(&self) -> Dictionary
pub fn to_dict(&self) -> Dictionary
Convert to PDF dictionary
Trait Implementations§
Source§impl Clone for EncryptionDictionary
impl Clone for EncryptionDictionary
Source§fn clone(&self) -> EncryptionDictionary
fn clone(&self) -> EncryptionDictionary
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 EncryptionDictionary
impl RefUnwindSafe for EncryptionDictionary
impl Send for EncryptionDictionary
impl Sync for EncryptionDictionary
impl Unpin for EncryptionDictionary
impl UnwindSafe for EncryptionDictionary
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> 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