pub struct Encryptor { /* private fields */ }Expand description
An AES-128 sample encryptor bound to one content key.
Implementations§
Source§impl Encryptor
impl Encryptor
Sourcepub fn encrypt(
&self,
scheme: Scheme,
pattern: Pattern,
iv: &[u8; 16],
data: &mut [u8],
subsamples: &[Subsample],
) -> Result<()>
pub fn encrypt( &self, scheme: Scheme, pattern: Pattern, iv: &[u8; 16], data: &mut [u8], subsamples: &[Subsample], ) -> Result<()>
Encrypt data in place under scheme with the given pattern, treating
it as the given subsample layout. iv is the 16-byte initialization
vector (per-sample, or the constant IV for cbcs). pattern must be
Pattern::NONE for the non-pattern schemes cenc/cbc1.
Auto Trait Implementations§
impl Freeze for Encryptor
impl RefUnwindSafe for Encryptor
impl Send for Encryptor
impl Sync for Encryptor
impl Unpin for Encryptor
impl UnsafeUnpin for Encryptor
impl UnwindSafe for Encryptor
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