pub enum CryptMethod {
Rc4,
Aes128,
Aes256,
}Expand description
Per-object encryption modes. Picked from the file’s encryption dictionary at open time — every crypt operation uses the same mode (round-4 doesn’t yet support per-stream crypt-filter overrides; if the file requires that, decryption surfaces a clear error).
Variants§
Rc4
Algorithm 1 + RC4. Used when V ∈ {1, 2}, or V=4 with CFM=V2.
Aes128
Algorithm 1 + AES-128 CBC. Used when V=4 with CFM=AESV2.
Aes256
AES-256 CBC. Used when V=5 (R=5 / R=6) with CFM=AESV3. Per
ISO 32000-2:2020 §7.6.3.1 the per-object key derivation
(Algorithm 1) is not applied — the file encryption key is
fed to AES-256 directly. The IV is still the leading 16 bytes
of the ciphertext as for AESV2.
Trait Implementations§
Source§impl Clone for CryptMethod
impl Clone for CryptMethod
Source§fn clone(&self) -> CryptMethod
fn clone(&self) -> CryptMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CryptMethod
Source§impl Debug for CryptMethod
impl Debug for CryptMethod
impl Eq for CryptMethod
Source§impl PartialEq for CryptMethod
impl PartialEq for CryptMethod
Source§fn eq(&self, other: &CryptMethod) -> bool
fn eq(&self, other: &CryptMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CryptMethod
Auto Trait Implementations§
impl Freeze for CryptMethod
impl RefUnwindSafe for CryptMethod
impl Send for CryptMethod
impl Sync for CryptMethod
impl Unpin for CryptMethod
impl UnsafeUnpin for CryptMethod
impl UnwindSafe for CryptMethod
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