Struct password_hash::PasswordHashString
source · pub struct PasswordHashString { /* private fields */ }
Expand description
Serialized PasswordHash
.
This type contains a serialized password hash string which is ensured to parse successfully.
Implementations§
source§impl PasswordHashString
impl PasswordHashString
sourcepub fn new(s: &str) -> Result<Self>
pub fn new(s: &str) -> Result<Self>
Parse a password hash from a string in the PHC string format.
sourcepub fn parse(s: &str, encoding: Encoding) -> Result<Self>
pub fn parse(s: &str, encoding: Encoding) -> Result<Self>
Parse a password hash from the given Encoding
.
sourcepub fn password_hash(&self) -> PasswordHash<'_>
pub fn password_hash(&self) -> PasswordHash<'_>
Parse this owned string as a PasswordHash
.
sourcepub fn encoding(&self) -> Encoding
pub fn encoding(&self) -> Encoding
Get the Encoding
that this PasswordHashString
is serialized with.
sourcepub fn params(&self) -> ParamsString
pub fn params(&self) -> ParamsString
Algorithm-specific parameters.
Trait Implementations§
source§impl AsRef<str> for PasswordHashString
impl AsRef<str> for PasswordHashString
source§impl Clone for PasswordHashString
impl Clone for PasswordHashString
source§fn clone(&self) -> PasswordHashString
fn clone(&self) -> PasswordHashString
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PasswordHashString
impl Debug for PasswordHashString
source§impl Display for PasswordHashString
impl Display for PasswordHashString
source§impl From<&PasswordHash<'_>> for PasswordHashString
impl From<&PasswordHash<'_>> for PasswordHashString
source§fn from(hash: &PasswordHash<'_>) -> PasswordHashString
fn from(hash: &PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
source§impl From<PasswordHash<'_>> for PasswordHashString
impl From<PasswordHash<'_>> for PasswordHashString
source§fn from(hash: PasswordHash<'_>) -> PasswordHashString
fn from(hash: PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
source§impl FromStr for PasswordHashString
impl FromStr for PasswordHashString
source§impl PartialEq<PasswordHashString> for PasswordHashString
impl PartialEq<PasswordHashString> for PasswordHashString
source§fn eq(&self, other: &PasswordHashString) -> bool
fn eq(&self, other: &PasswordHashString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.