Struct rustun::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]
fn new_short_term_credential<M>(message: &M, password: &str) -> Result<Self> where
M: Message,
M: Message,
Makes a new MessageIntegrity
instance for short-term credentials.
fn new_long_term_credential<M>(
message: &M,
username: &Username,
realm: &Realm,
password: &str
) -> Result<Self> where
M: Message,
message: &M,
username: &Username,
realm: &Realm,
password: &str
) -> Result<Self> where
M: Message,
Makes a new MessageIntegrity
instance for long-term credentials.
fn check_short_term_credential(&self, password: &str) -> Result<()>
Checks whether this has the valid short-term credential for password
.
fn check_long_term_credential(
&self,
username: &Username,
realm: &Realm,
password: &str
) -> Result<()>
&self,
username: &Username,
realm: &Realm,
password: &str
) -> Result<()>
Checks whether this has the valid long-term credential for password
.
fn hmac_sha1(&self) -> [u8; 20]
Returns the HMAC-SHA1 of this instance.
Trait Implementations
impl Clone for MessageIntegrity
[src]
fn clone(&self) -> MessageIntegrity
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Attribute for MessageIntegrity
[src]
fn get_type(&self) -> Type
Returns the attribute type of this instance.
fn try_from_raw(attr: &RawAttribute, message: &RawMessage) -> Result<Self>
Tries to convert from RawAttribute
. Read more
fn encode_value(&self, _message: &RawMessage) -> Result<Vec<u8>>
Tries to encode the value of this attribute to bytes.
fn try_to_raw(&self, message: &RawMessage) -> Result<RawAttribute>
Tries to convert to RawAttribute
. Read more
impl Hash for MessageIntegrity
[src]
fn hash<H: Hasher>(&self, hasher: &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
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for MessageIntegrity
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.