pub struct TunnelCrypto { /* private fields */ }Expand description
Provides encryption and decryption using XChaCha20-Poly1305
XChaCha20-Poly1305 is chosen because:
- 24-byte nonce allows safe random nonce generation
- AEAD provides both encryption and authentication
- Fast in software (no hardware AES required)
- Well-audited implementation
Implementations§
Auto Trait Implementations§
impl Freeze for TunnelCrypto
impl RefUnwindSafe for TunnelCrypto
impl Send for TunnelCrypto
impl Sync for TunnelCrypto
impl Unpin for TunnelCrypto
impl UnsafeUnpin for TunnelCrypto
impl UnwindSafe for TunnelCrypto
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