pub struct MediaEncryption {
pub algorithm: EncryptionMethod,
pub mki_present: u32,
pub key_derivation_rate: u32,
/* private fields */
}Expand description
SRTP keying material. Debug output intentionally exposes metadata only.
Fields§
§algorithm: EncryptionMethod§mki_present: u32Non-zero when the media packet carries a master-key identifier.
key_derivation_rate: u32SRTP key-derivation rate word.
Implementations§
Source§impl MediaEncryption
impl MediaEncryption
Sourcepub fn new(
algorithm: EncryptionMethod,
key: &[u8],
salt: &[u8],
mki_present: u32,
key_derivation_rate: u32,
) -> Result<Self, CodecError>
pub fn new( algorithm: EncryptionMethod, key: &[u8], salt: &[u8], mki_present: u32, key_derivation_rate: u32, ) -> Result<Self, CodecError>
Copies validated SRTP keying material into redacted, zeroizing storage.
Keys and salts are independently limited to 16 bytes.
pub fn key(&self) -> &[u8] ⓘ
pub fn salt(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for MediaEncryption
impl Clone for MediaEncryption
Source§fn clone(&self) -> MediaEncryption
fn clone(&self) -> MediaEncryption
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 moreSource§impl Debug for MediaEncryption
impl Debug for MediaEncryption
Source§impl Drop for MediaEncryption
impl Drop for MediaEncryption
impl Eq for MediaEncryption
Source§impl PartialEq for MediaEncryption
impl PartialEq for MediaEncryption
impl StructuralPartialEq for MediaEncryption
Auto Trait Implementations§
impl Freeze for MediaEncryption
impl RefUnwindSafe for MediaEncryption
impl Send for MediaEncryption
impl Sync for MediaEncryption
impl Unpin for MediaEncryption
impl UnsafeUnpin for MediaEncryption
impl UnwindSafe for MediaEncryption
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