pub struct ControlWord(pub [u8; 8]);Expand description
An 8-byte DVB-CSA control word.
Tuple Fields§
§0: [u8; 8]Implementations§
Source§impl ControlWord
impl ControlWord
Sourcepub const fn from_bytes(bytes: [u8; 8]) -> Self
pub const fn from_bytes(bytes: [u8; 8]) -> Self
Create a ControlWord from 8 bytes.
Sourcepub fn expand_block(&self) -> [u8; 56]
pub fn expand_block(&self) -> [u8; 56]
Expand the control word into 56 block-cipher round-key bytes.
Sourcepub fn expand_stream(&self) -> [u8; 8]
pub fn expand_stream(&self) -> [u8; 8]
Expand to the nibble-swapped stream-cipher seed (cws).
Each byte has its high and low nibbles swapped:
cws[i] = (cw[i] >> 4) | (cw[i] << 4)
Trait Implementations§
Source§impl Clone for ControlWord
impl Clone for ControlWord
Source§fn clone(&self) -> ControlWord
fn clone(&self) -> ControlWord
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 ControlWord
Source§impl Debug for ControlWord
impl Debug for ControlWord
impl Eq for ControlWord
Source§impl PartialEq for ControlWord
impl PartialEq for ControlWord
impl StructuralPartialEq for ControlWord
Auto Trait Implementations§
impl Freeze for ControlWord
impl RefUnwindSafe for ControlWord
impl Send for ControlWord
impl Sync for ControlWord
impl Unpin for ControlWord
impl UnsafeUnpin for ControlWord
impl UnwindSafe for ControlWord
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