Struct webrtc_srtp::context::Context
source · pub struct Context { /* private fields */ }
Expand description
Context represents a SRTP cryptographic context Context can only be used for one-way operations it must either used ONLY for encryption or ONLY for decryption
Implementations§
source§impl Context
impl Context
source§impl Context
impl Context
pub fn decrypt_rtp_with_header( &mut self, encrypted: &[u8], header: &Header ) -> Result<Bytes, Error>
sourcepub fn decrypt_rtp(&mut self, encrypted: &[u8]) -> Result<Bytes, Error>
pub fn decrypt_rtp(&mut self, encrypted: &[u8]) -> Result<Bytes, Error>
DecryptRTP decrypts a RTP packet with an encrypted payload
pub fn encrypt_rtp_with_header( &mut self, payload: &[u8], header: &Header ) -> Result<Bytes, Error>
source§impl Context
impl Context
sourcepub fn new(
master_key: &[u8],
master_salt: &[u8],
profile: ProtectionProfile,
srtp_ctx_opt: Option<ContextOption>,
srtcp_ctx_opt: Option<ContextOption>
) -> Result<Context, Error>
pub fn new( master_key: &[u8], master_salt: &[u8], profile: ProtectionProfile, srtp_ctx_opt: Option<ContextOption>, srtcp_ctx_opt: Option<ContextOption> ) -> Result<Context, Error>
CreateContext creates a new SRTP Context
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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