pub struct ControlCrypto { /* private fields */ }Expand description
Signs and verifies control envelopes using the derived session keys.
Implementations§
Source§impl ControlCrypto
impl ControlCrypto
pub fn new(keys: SessionKeys) -> Self
pub fn mac_for_payload( &self, seq: u64, session_id: &Uuid, payload: &Value, ) -> Result<Vec<u8>, HandshakeError>
pub fn verify_mac( &self, seq: u64, session_id: &Uuid, payload: &Value, mac: &[u8], ) -> Result<(), HandshakeError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlCrypto
impl RefUnwindSafe for ControlCrypto
impl Send for ControlCrypto
impl Sync for ControlCrypto
impl Unpin for ControlCrypto
impl UnwindSafe for ControlCrypto
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