pub struct SecurityMode {
pub mode: u8,
pub encrypted_blocks: u8,
}Expand description
The security mode from a transport header’s configuration field (OMS Vol. 2 §7.2.4, Tables 19 and 20).
Fields§
§mode: u8The mode: 0 = none, 5 = AES-128-CBC with a static key, 7 = AES-128-CBC with a derived key and CMAC, others as defined in EN 13757-7.
encrypted_blocks: u8The number of encrypted 16-byte blocks; 0 = none, 15 = everything to the end.
Implementations§
Source§impl SecurityMode
impl SecurityMode
Sourcepub const fn from_config(config: [u8; 2]) -> Self
pub const fn from_config(config: [u8; 2]) -> Self
Read the mode from the 2-byte configuration field (as transmitted, LSB first).
Trait Implementations§
Source§impl Clone for SecurityMode
impl Clone for SecurityMode
impl Copy for SecurityMode
Source§impl Debug for SecurityMode
impl Debug for SecurityMode
impl Eq for SecurityMode
Source§impl PartialEq for SecurityMode
impl PartialEq for SecurityMode
impl StructuralPartialEq for SecurityMode
Auto Trait Implementations§
impl Forget for SecurityMode
impl Freeze for SecurityMode
impl Move for SecurityMode
impl RefUnwindSafe for SecurityMode
impl Send for SecurityMode
impl Sync for SecurityMode
impl Unpin for SecurityMode
impl UnsafeUnpin for SecurityMode
impl UnwindSafe for SecurityMode
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