pub struct AivpnPacket {
pub resonance_tag: [u8; 8],
pub mask_dependent_header: Vec<u8>,
pub pad_len: u16,
pub encrypted_payload: Vec<u8>,
pub random_padding: Vec<u8>,
}Expand description
AIVPN Packet structure
Fields§
§resonance_tag: [u8; 8]§mask_dependent_header: Vec<u8>§pad_len: u16§encrypted_payload: Vec<u8>§random_padding: Vec<u8>Implementations§
Source§impl AivpnPacket
impl AivpnPacket
pub fn new( resonance_tag: [u8; 8], mask_dependent_header: Vec<u8>, encrypted_payload: Vec<u8>, padding_len: u16, ) -> Self
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Deserialize packet from bytes
Sourcepub fn from_bytes_with_mdh_len(data: &[u8], mdh_len: usize) -> Result<Self>
pub fn from_bytes_with_mdh_len(data: &[u8], mdh_len: usize) -> Result<Self>
Parse with mask context (knowing MDH length)
Trait Implementations§
Source§impl Clone for AivpnPacket
impl Clone for AivpnPacket
Source§fn clone(&self) -> AivpnPacket
fn clone(&self) -> AivpnPacket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AivpnPacket
impl RefUnwindSafe for AivpnPacket
impl Send for AivpnPacket
impl Sync for AivpnPacket
impl Unpin for AivpnPacket
impl UnsafeUnpin for AivpnPacket
impl UnwindSafe for AivpnPacket
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