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
sourceimpl 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 as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl<'_> Write for &mut [u8]impl<'_> Read for &[u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl<'_> Write for &mut [u8]impl<'_> Read for &[u8]
Borrow this value as bytes.
sourcepub fn params(&self) -> ParamsString
pub fn params(&self) -> ParamsString
Algorithm-specific parameters.
Trait Implementations
sourceimpl AsRef<str> for PasswordHashString
impl AsRef<str> for PasswordHashString
sourceimpl Clone for PasswordHashString
impl Clone for PasswordHashString
sourcefn clone(&self) -> PasswordHashString
fn clone(&self) -> PasswordHashString
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PasswordHashString
impl Debug for PasswordHashString
sourceimpl Display for PasswordHashString
impl Display for PasswordHashString
sourceimpl From<&PasswordHash<'_>> for PasswordHashString
impl From<&PasswordHash<'_>> for PasswordHashString
sourcefn from(hash: &PasswordHash<'_>) -> PasswordHashString
fn from(hash: &PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
sourceimpl From<PasswordHash<'_>> for PasswordHashString
impl From<PasswordHash<'_>> for PasswordHashString
sourcefn from(hash: PasswordHash<'_>) -> PasswordHashString
fn from(hash: PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
sourceimpl FromStr for PasswordHashString
impl FromStr for PasswordHashString
sourceimpl PartialEq<PasswordHashString> for PasswordHashString
impl PartialEq<PasswordHashString> for PasswordHashString
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &PasswordHashString) -> bool
fn ne(&self, other: &PasswordHashString) -> bool
This method tests for !=
.
impl Eq for PasswordHashString
impl StructuralEq for PasswordHashString
impl StructuralPartialEq for PasswordHashString
Auto Trait Implementations
impl RefUnwindSafe for PasswordHashString
impl Send for PasswordHashString
impl Sync for PasswordHashString
impl Unpin for PasswordHashString
impl UnwindSafe for PasswordHashString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more