pub struct Frame {
pub header: WireHeader,
pub payload: Vec<u8>,
pub tag: [u8; 16],
pub signature: Option<[u8; 64]>,
}Fields§
§header: WireHeaderFor encrypted frames, this is ciphertext without the AEAD tag.
For unencrypted frames, this is:
pad_len(4-byte big endian) || padding || plaintext
payload: Vec<u8>§tag: [u8; 16]§signature: Option<[u8; 64]>Implementations§
Source§impl Frame
impl Frame
pub fn parse(frame: &[u8]) -> Result<Self, MoqSecureError>
pub fn serialize(&self) -> Vec<u8> ⓘ
pub fn aad_bytes(&self) -> Vec<u8> ⓘ
pub fn digest_for_signature(&self) -> [u8; 32]
pub fn decode_plaintext_with_key_store( &self, key_store: &dyn KeyStore, broadcaster_public_key: &VerifyingKey, lease_remaining: &mut u8, ) -> Result<Vec<u8>, MoqSecureError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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