Struct password_hash::PasswordHashString
source · pub struct PasswordHashString { /* private fields */ }
Available on crate feature
alloc
only.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 for PasswordHashString
impl PartialEq for PasswordHashString
impl Eq for PasswordHashString
impl StructuralPartialEq for PasswordHashString
Auto Trait Implementations§
impl Freeze for PasswordHashString
impl RefUnwindSafe for PasswordHashString
impl Send for PasswordHashString
impl Sync for PasswordHashString
impl Unpin for PasswordHashString
impl UnwindSafe for PasswordHashString
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)