pub struct StandardSecurity<'a> {
pub revision: u8,
pub key_length: usize,
pub owner: &'a [u8],
pub user: &'a [u8],
pub owner_encryption: &'a [u8],
pub user_encryption: &'a [u8],
pub perms: Option<&'a [u8]>,
pub permissions: u32,
pub id0: &'a [u8],
pub encrypt_metadata: bool,
}Expand description
The values of a standard security handler’s /Encrypt dictionary that authentication needs
(ISO 32000-2 Table 21). The caller extracts them; byte strings are taken as stored.
Added in 0.2.0.
Fields§
§revision: u8/R, 2–6.
key_length: usizeThe file key length in bytes (/Length / 8): 5–16 for R2–R4 (R2 is always 5); ignored for
R5/R6, whose key is 32 bytes.
owner: &'a [u8]/O (32 bytes for R2–R4, 48 for R5/R6).
user: &'a [u8]/U (32 bytes for R2–R4, 48 for R5/R6).
owner_encryption: &'a [u8]/OE (R5/R6, 32 bytes; empty otherwise).
user_encryption: &'a [u8]/UE (R5/R6, 32 bytes; empty otherwise).
perms: Option<&'a [u8]>/Perms (R5/R6, 16 bytes), if present.
permissions: u32/P as an unsigned 32-bit value (see Permissions).
id0: &'a [u8]The first element of the trailer’s /ID (empty when absent).
encrypt_metadata: bool/EncryptMetadata (default true).
Trait Implementations§
Source§impl<'a> Clone for StandardSecurity<'a>
impl<'a> Clone for StandardSecurity<'a>
impl<'a> Copy for StandardSecurity<'a>
Source§impl Debug for StandardSecurity<'_>
impl Debug for StandardSecurity<'_>
impl<'a> Eq for StandardSecurity<'a>
Source§impl<'a> PartialEq for StandardSecurity<'a>
impl<'a> PartialEq for StandardSecurity<'a>
impl<'a> StructuralPartialEq for StandardSecurity<'a>
Auto Trait Implementations§
impl<'a> Forget for StandardSecurity<'a>
impl<'a> Freeze for StandardSecurity<'a>
impl<'a> Move for StandardSecurity<'a>
impl<'a> RefUnwindSafe for StandardSecurity<'a>
impl<'a> Send for StandardSecurity<'a>
impl<'a> Sync for StandardSecurity<'a>
impl<'a> Unpin for StandardSecurity<'a>
impl<'a> UnsafeUnpin for StandardSecurity<'a>
impl<'a> UnwindSafe for StandardSecurity<'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