pub enum EncScheme {
Cenc,
Cens,
Cbc1,
Cbcs,
}Expand description
A CENC protection scheme (the schm scheme_type).
Variants§
Cenc
cenc — AES-128 CTR, (sub)sample encryption.
Cens
cens — AES-128 CTR with pattern encryption.
Cbc1
cbc1 — AES-128 CBC, full-region (sub)sample encryption.
Cbcs
cbcs — AES-128 CBC, pattern encryption (Apple FairPlay friendly).
Implementations§
Source§impl Scheme
impl Scheme
Sourcepub fn scheme_type(self) -> [u8; 4]
pub fn scheme_type(self) -> [u8; 4]
The four-character scheme type written into the schm box.
Sourcepub fn is_cbc(self) -> bool
pub fn is_cbc(self) -> bool
CBC-based schemes (cbc1, cbcs); the others are CTR (cenc, cens).
Non-pattern CBC requires 16-byte-aligned protected subsample ranges.
Sourcepub fn is_pattern(self) -> bool
pub fn is_pattern(self) -> bool
Pattern-capable schemes (cens, cbcs) — written with a version-1
tenc carrying the crypt/skip block counts.
Sourcepub fn uses_constant_iv(self) -> bool
pub fn uses_constant_iv(self) -> bool
cbcs reuses one constant IV for every sample; the others derive a
unique per-sample IV.
Trait Implementations§
impl Copy for Scheme
impl Eq for Scheme
impl StructuralPartialEq for Scheme
Auto Trait Implementations§
impl Freeze for Scheme
impl RefUnwindSafe for Scheme
impl Send for Scheme
impl Sync for Scheme
impl Unpin for Scheme
impl UnsafeUnpin for Scheme
impl UnwindSafe for Scheme
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