pub struct KeyingMaterialMessage {
pub pt: PacketType,
pub key_flags: KeyFlags,
pub keki: u32,
pub cipher: CipherType,
pub auth: Auth,
pub salt: Vec<u8>,
pub wrapped_keys: Vec<u8>,
}
Expand description
from https://github.com/Haivision/srt/blob/2ef4ef003c2006df1458de6d47fbe3d2338edf69/haicrypt/hcrypt_msg.h#L76-L96 or https://datatracker.ietf.org/doc/html/draft-sharabayko-srt-00#section-3.2.2
HaiCrypt KMmsg (Keying Material Message):
ⓘ
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
+0x00 |0|Vers | PT | Sign | resv |KF |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
+0x04 | KEKI |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
+0x08 | Cipher | Auth | SE | Resv1 |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
+0x0C | Resv2 | Slen/4 | Klen/4 |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
+0x10 | Salt |
| ... |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
| Wrap |
| ... |
+-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+
Fields§
§pt: PacketType
§key_flags: KeyFlags
§keki: u32
§cipher: CipherType
§auth: Auth
§salt: Vec<u8>
§wrapped_keys: Vec<u8>
Implementations§
Source§impl KeyingMaterialMessage
impl KeyingMaterialMessage
pub fn parse( buf: &mut impl Buf, ) -> Result<KeyingMaterialMessage, PacketParseError>
Trait Implementations§
Source§impl Clone for KeyingMaterialMessage
impl Clone for KeyingMaterialMessage
Source§fn clone(&self) -> KeyingMaterialMessage
fn clone(&self) -> KeyingMaterialMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeyingMaterialMessage
impl Debug for KeyingMaterialMessage
Source§impl PartialEq for KeyingMaterialMessage
impl PartialEq for KeyingMaterialMessage
impl Eq for KeyingMaterialMessage
impl StructuralPartialEq for KeyingMaterialMessage
Auto Trait Implementations§
impl Freeze for KeyingMaterialMessage
impl RefUnwindSafe for KeyingMaterialMessage
impl Send for KeyingMaterialMessage
impl Sync for KeyingMaterialMessage
impl Unpin for KeyingMaterialMessage
impl UnwindSafe for KeyingMaterialMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.