pub struct RelayCrypto { /* private fields */ }Implementations§
Source§impl RelayCrypto
impl RelayCrypto
pub fn new(df: &[u8], db: &[u8], kf: &[u8], kb: &[u8], kind: DigestKind) -> Self
pub fn encrypt_relay( &mut self, relay_cmd: u8, stream_id: u16, data: &[u8], ) -> Result<Bytes>
pub fn decrypt_recognized(&mut self, encrypted: &[u8]) -> Result<Option<Bytes>>
pub fn recognize_decrypted(&mut self, body: &[u8]) -> bool
pub fn encrypt_body_only(&mut self, body: &[u8]) -> Result<Bytes>
pub fn decrypt_body_only(&mut self, body: &[u8]) -> Result<Bytes>
Auto Trait Implementations§
impl Freeze for RelayCrypto
impl RefUnwindSafe for RelayCrypto
impl Send for RelayCrypto
impl Sync for RelayCrypto
impl Unpin for RelayCrypto
impl UnsafeUnpin for RelayCrypto
impl UnwindSafe for RelayCrypto
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