Struct sodiumoxide::crypto::pwhash::argon2id13::HashedPassword
source · Expand description
HashedPassword
is a password verifier generated from a password
A HashedPassword
is zero-terminated, includes only ASCII characters and can
be conveniently stored into SQL databases and other data stores. No
additional information has to be stored in order to verify the password.
Tuple Fields§
§0: [u8; 128]
Implementations§
source§impl HashedPassword
impl HashedPassword
sourcepub fn from_slice(bs: &[u8]) -> Option<HashedPassword>
pub fn from_slice(bs: &[u8]) -> Option<HashedPassword>
from_slice()
creates an object from a byte slice
This function will fail and return None
if the length of
the byte-slice isn’t equal to the length of the object
Trait Implementations§
source§impl AsRef<[u8]> for HashedPassword
impl AsRef<[u8]> for HashedPassword
source§impl Clone for HashedPassword
impl Clone for HashedPassword
source§fn clone(&self) -> HashedPassword
fn clone(&self) -> HashedPassword
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HashedPassword
impl Debug for HashedPassword
source§impl<'de> Deserialize<'de> for HashedPassword
impl<'de> Deserialize<'de> for HashedPassword
source§fn deserialize<D>(deserializer: D) -> Result<HashedPassword, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<HashedPassword, D::Error>where
D: Deserializer<'de>,
source§impl Hash for HashedPassword
impl Hash for HashedPassword
source§impl Index<Range<usize>> for HashedPassword
impl Index<Range<usize>> for HashedPassword
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..b] == y[a..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
source§impl Index<RangeFrom<usize>> for HashedPassword
impl Index<RangeFrom<usize>> for HashedPassword
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..] == y[a..]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
source§impl Index<RangeFull> for HashedPassword
impl Index<RangeFull> for HashedPassword
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[] == y[]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
source§impl Index<RangeTo<usize>> for HashedPassword
impl Index<RangeTo<usize>> for HashedPassword
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[..b] == y[..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
source§impl Ord for HashedPassword
impl Ord for HashedPassword
source§fn cmp(&self, other: &HashedPassword) -> Ordering
fn cmp(&self, other: &HashedPassword) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<HashedPassword> for HashedPassword
impl PartialEq<HashedPassword> for HashedPassword
source§fn eq(&self, other: &HashedPassword) -> bool
fn eq(&self, other: &HashedPassword) -> bool
source§impl PartialOrd<HashedPassword> for HashedPassword
impl PartialOrd<HashedPassword> for HashedPassword
source§fn partial_cmp(&self, other: &HashedPassword) -> Option<Ordering>
fn partial_cmp(&self, other: &HashedPassword) -> Option<Ordering>
source§fn lt(&self, other: &HashedPassword) -> bool
fn lt(&self, other: &HashedPassword) -> bool
source§fn le(&self, other: &HashedPassword) -> bool
fn le(&self, other: &HashedPassword) -> bool
self
and other
) and is used by the <=
operator. Read more