pub struct SdlsProcessor<C> { /* private fields */ }Expand description
SDLS-based security processor (CCSDS 355.0-B-2).
Wraps a SecurityAssociation and CryptoProvider to
implement in-place frame encryption and authentication.
The header_end offset tells the processor where the transfer
frame header ends (5 for TC, 6 for TM). The security header
is inserted at that offset, followed by the encrypted data
field and optional MAC trailer.
Implementations§
Source§impl<C: CryptoProvider> SdlsProcessor<C>
impl<C: CryptoProvider> SdlsProcessor<C>
Sourcepub fn new(sa: SecurityAssociation, crypto: C, header_end: usize) -> Self
pub fn new(sa: SecurityAssociation, crypto: C, header_end: usize) -> Self
Creates a new SDLS processor.
header_end is the byte offset where the transfer frame
header ends (5 for TC, 6 for TM).
Sourcepub fn sa(&self) -> &SecurityAssociation
pub fn sa(&self) -> &SecurityAssociation
Returns a reference to the security association.
Sourcepub fn sa_mut(&mut self) -> &mut SecurityAssociation
pub fn sa_mut(&mut self) -> &mut SecurityAssociation
Returns a mutable reference to the security association.
Trait Implementations§
Source§impl<C: CryptoProvider> SecurityProcessor for SdlsProcessor<C>
impl<C: CryptoProvider> SecurityProcessor for SdlsProcessor<C>
Auto Trait Implementations§
impl<C> Freeze for SdlsProcessor<C>where
C: Freeze,
impl<C> RefUnwindSafe for SdlsProcessor<C>where
C: RefUnwindSafe,
impl<C> Send for SdlsProcessor<C>where
C: Send,
impl<C> Sync for SdlsProcessor<C>where
C: Sync,
impl<C> Unpin for SdlsProcessor<C>where
C: Unpin,
impl<C> UnsafeUnpin for SdlsProcessor<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for SdlsProcessor<C>where
C: UnwindSafe,
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