Struct stun_codec::rfc5389::attributes::MessageIntegrity [−][src]
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]
message: &Message<A>,
password: &str
) -> Result<Self> where
A: Attribute,
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]
message: &Message<A>,
username: &Username,
realm: &Realm,
password: &str
) -> Result<Self> where
A: Attribute,
Makes a new MessageIntegrity
instance for long-term credentials.
pub fn check_short_term_credential(
&self,
password: &str
) -> Result<(), ErrorCode>
[src]
&self,
password: &str
) -> Result<(), ErrorCode>
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]
&self,
username: &Username,
realm: &Realm,
password: &str
) -> Result<(), ErrorCode>
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.
fn get_type(&self) -> AttributeType
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
impl Clone for MessageIntegrity
[src]
fn clone(&self) -> MessageIntegrity
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MessageIntegrity
[src]
impl Eq for MessageIntegrity
[src]
impl From<MessageIntegrity> for Attribute
[src]
fn from(f: MessageIntegrity) -> Self
[src]
impl Hash for MessageIntegrity
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MessageIntegrity> for MessageIntegrity
[src]
fn eq(&self, other: &MessageIntegrity) -> bool
[src]
fn ne(&self, other: &MessageIntegrity) -> bool
[src]
impl StructuralEq for MessageIntegrity
[src]
impl StructuralPartialEq for MessageIntegrity
[src]
impl TryAsRef<MessageIntegrity> for Attribute
[src]
fn try_as_ref(&self) -> Option<&MessageIntegrity>
[src]
Auto Trait Implementations
impl RefUnwindSafe for MessageIntegrity
[src]
impl Send for MessageIntegrity
[src]
impl Sync for MessageIntegrity
[src]
impl Unpin for MessageIntegrity
[src]
impl UnwindSafe for MessageIntegrity
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,