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
Methods
impl MessageIntegrity
[src]
impl MessageIntegrity
pub const CODEPOINT: u16
CODEPOINT: u16 = 8
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]
pub fn new_short_term_credential<A>(
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]
pub fn new_long_term_credential<A>(
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]
pub fn check_short_term_credential(
&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]
pub fn check_long_term_credential(
&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]
pub fn hmac_sha1(&self) -> [u8; 20]
Returns the HMAC-SHA1 of this instance.
Trait Implementations
impl Debug for MessageIntegrity
[src]
impl Debug for MessageIntegrity
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for MessageIntegrity
[src]
impl Clone for MessageIntegrity
fn clone(&self) -> MessageIntegrity
[src]
fn clone(&self) -> MessageIntegrity
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for MessageIntegrity
[src]
impl PartialEq for MessageIntegrity
fn eq(&self, other: &MessageIntegrity) -> bool
[src]
fn eq(&self, other: &MessageIntegrity) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MessageIntegrity) -> bool
[src]
fn ne(&self, other: &MessageIntegrity) -> bool
This method tests for !=
.
impl Eq for MessageIntegrity
[src]
impl Eq for MessageIntegrity
impl Hash for MessageIntegrity
[src]
impl Hash for MessageIntegrity
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Attribute for MessageIntegrity
[src]
impl Attribute for MessageIntegrity
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 get_type(&self) -> AttributeType
Returns the type of the attribute.
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called after decoding the attribute and before being appended to the given message. Read more
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called before encoding the attribute. Read more
impl From<MessageIntegrity> for Attribute
[src]
impl From<MessageIntegrity> for Attribute
fn from(f: MessageIntegrity) -> Self
[src]
fn from(f: MessageIntegrity) -> Self
Performs the conversion.
impl TryAsRef<MessageIntegrity> for Attribute
[src]
impl TryAsRef<MessageIntegrity> for Attribute
fn try_as_ref(&self) -> Option<&MessageIntegrity>
[src]
fn try_as_ref(&self) -> Option<&MessageIntegrity>
Attempts to convert self
to a reference to T
. Read more
Auto Trait Implementations
impl Send for MessageIntegrity
impl Send for MessageIntegrity
impl Sync for MessageIntegrity
impl Sync for MessageIntegrity