Struct webrtc_srtp::context::Context[][src]

pub struct Context { /* fields omitted */ }

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

impl Context[src]

pub fn decrypt_rtcp(&mut self, encrypted: &Bytes) -> Result<Bytes, Error>[src]

DecryptRTCP decrypts a RTCP packet with an encrypted payload

pub fn encrypt_rtcp(&mut self, decrypted: &Bytes) -> Result<Bytes, Error>[src]

EncryptRTCP marshals and encrypts an RTCP packet, writing to the dst buffer provided. If the dst buffer does not have the capacity to hold len(plaintext) + 14 bytes, a new one will be allocated and returned.

impl Context[src]

pub fn decrypt_rtp_with_header(
    &mut self,
    encrypted: &Bytes,
    header: &Header
) -> Result<Bytes, Error>
[src]

pub fn decrypt_rtp(&mut self, encrypted: &Bytes) -> Result<Bytes, Error>[src]

DecryptRTP decrypts a RTP packet with an encrypted payload

pub fn encrypt_rtp_with_header(
    &mut self,
    plaintext: &Bytes,
    header: &Header
) -> Result<Bytes, Error>
[src]

pub fn encrypt_rtp(&mut self, plaintext: &Bytes) -> Result<Bytes, Error>[src]

EncryptRTP marshals and encrypts an RTP packet, writing to the dst buffer provided. If the dst buffer does not have the capacity to hold len(plaintext) + 10 bytes, a new one will be allocated and returned.

impl Context[src]

pub fn new(
    master_key: &[u8],
    master_salt: &[u8],
    profile: ProtectionProfile,
    srtp_ctx_opt: Option<ContextOption>,
    srtcp_ctx_opt: Option<ContextOption>
) -> Result<Context, Error>
[src]

CreateContext creates a new SRTP Context

Trait Implementations

Auto Trait Implementations

impl !RefUnwindSafe for Context

impl !Sync for Context

impl Unpin for Context

impl !UnwindSafe for Context

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> Pipe for T where
    T: ?Sized

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,