pub enum Profile {
Aes128CmHmacSha1_80,
}Expand description
An SRTP protection profile (RFC 5764 §4.1.2).
Only the one sipx can perform. §4.1.2 defines four; the two NULL profiles encrypt nothing, and
offering AES128_CM_HMAC_SHA1_32 would mean an SRTP transform with a 32-bit tag that
sipx_rtp::srtp does not implement. A profile list is a promise, so the list is short.
Variants§
Aes128CmHmacSha1_80
AES-128 counter mode, 80-bit HMAC-SHA1 tag — the same transform SDES negotiates.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn key_and_salt_len(self) -> (usize, usize)
pub fn key_and_salt_len(self) -> (usize, usize)
Master key and master salt lengths, in octets.
§4.1.2 states these in bits: a 128-bit key and a 112-bit salt. Fourteen octets of salt, not sixteen — the value that is easy to get wrong, and getting it wrong produces a key schedule that decrypts nothing with no error to say why.
Sourcepub fn exported_len(self) -> usize
pub fn exported_len(self) -> usize
How many octets to export from the handshake: 2 * (key + salt) (RFC 5764 §4.2).
Trait Implementations§
impl Copy for Profile
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more