Struct stun_codec::rfc5389::attributes::MessageIntegrity[][src]

pub struct MessageIntegrity { /* fields omitted */ }

MESSAGE-INTEGRITY attribute.

See RFC 5389 -- 15.3. MESSAGE-INTEGRITY about this attribute.

TODO

  • Support SASLprep

Implementations

impl MessageIntegrity[src]

pub const CODEPOINT: u16[src]

The codepoint of the type of the attribute.

pub fn new_short_term_credential<A>(
    message: &Message<A>,
    password: &str
) -> Result<Self> where
    A: Attribute
[src]

Makes a new MessageIntegrity instance for short-term credentials.

pub fn new_long_term_credential<A>(
    message: &Message<A>,
    username: &Username,
    realm: &Realm,
    password: &str
) -> Result<Self> where
    A: Attribute
[src]

Makes a new MessageIntegrity instance for long-term credentials.

pub fn check_short_term_credential(
    &self,
    password: &str
) -> Result<(), ErrorCode>
[src]

Checks whether this has the valid short-term credential for password.

pub fn check_long_term_credential(
    &self,
    username: &Username,
    realm: &Realm,
    password: &str
) -> Result<(), ErrorCode>
[src]

Checks whether this has the valid long-term credential for password.

pub fn hmac_sha1(&self) -> [u8; 20][src]

Returns the HMAC-SHA1 of this instance.

Trait Implementations

impl Attribute for MessageIntegrity[src]

type Decoder = MessageIntegrityDecoder

The decoder of the value part of the attribute.

type Encoder = MessageIntegrityEncoder

The encoder of the value part of the attribute.

impl Clone for MessageIntegrity[src]

impl Debug for MessageIntegrity[src]

impl Eq for MessageIntegrity[src]

impl From<MessageIntegrity> for Attribute[src]

impl Hash for MessageIntegrity[src]

impl PartialEq<MessageIntegrity> for MessageIntegrity[src]

impl StructuralEq for MessageIntegrity[src]

impl StructuralPartialEq for MessageIntegrity[src]

impl TryAsRef<MessageIntegrity> for Attribute[src]

Auto Trait Implementations

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.