pub struct Yescrypt;Available on crate feature
password-hash only.Expand description
yescrypt password hashing type which can produce and verify strings in Modular Crypt Format
(MCF) which begin with $y$
This is a ZST which impls traits from the password-hash crate, notably
the PasswordHasher, PasswordVerifier, and CustomizedPasswordHasher traits.
See the toplevel documentation for a code example.
Trait Implementations§
Source§impl CustomizedPasswordHasher<PasswordHash> for Yescrypt
impl CustomizedPasswordHasher<PasswordHash> for Yescrypt
Source§fn hash_password_customized(
&self,
password: &[u8],
salt: &[u8],
alg_id: Option<&str>,
version: Option<Version>,
params: Params,
) -> Result<PasswordHash>
fn hash_password_customized( &self, password: &[u8], salt: &[u8], alg_id: Option<&str>, version: Option<Version>, params: Params, ) -> Result<PasswordHash>
Compute a [
PasswordHash] from the provided password using an
explicit set of customized algorithm parameters as opposed to the
defaults. Read moreSource§impl PasswordHasher<PasswordHash> for Yescrypt
impl PasswordHasher<PasswordHash> for Yescrypt
Source§fn hash_password_with_salt(
&self,
password: &[u8],
salt: &[u8],
) -> Result<PasswordHash>
fn hash_password_with_salt( &self, password: &[u8], salt: &[u8], ) -> Result<PasswordHash>
Compute the hash
H from the given password and salt, potentially using configuration
stored in &self for the parameters, or otherwise the recommended defaults. Read moreSource§fn hash_password(&self, password: &[u8]) -> Result<H, Error>
fn hash_password(&self, password: &[u8]) -> Result<H, Error>
Available on crate feature
getrandom only.Compute the hash
H from the given password, potentially using configuration stored in
&self for the parameters, or otherwise the recommended defaults. Read moreSource§fn hash_password_with_rng<R>(
&self,
rng: &mut R,
password: &[u8],
) -> Result<H, Error>where
R: TryCryptoRng + ?Sized,
fn hash_password_with_rng<R>(
&self,
rng: &mut R,
password: &[u8],
) -> Result<H, Error>where
R: TryCryptoRng + ?Sized,
Available on crate feature
rand_core only.Compute the hash
H from the given password, potentially using configuration stored in
&self for the parameters, or otherwise the recommended defaults. Read moreSource§impl PasswordVerifier<PasswordHash> for Yescrypt
impl PasswordVerifier<PasswordHash> for Yescrypt
Source§fn verify_password(&self, password: &[u8], hash: &PasswordHash) -> Result<()>
fn verify_password(&self, password: &[u8], hash: &PasswordHash) -> Result<()>
Compute this password hashing function against the provided password
using the parameters from the provided password hash and see if the
computed output matches.
Source§impl PasswordVerifier<PasswordHashRef> for Yescrypt
impl PasswordVerifier<PasswordHashRef> for Yescrypt
Source§fn verify_password(&self, password: &[u8], hash: &PasswordHashRef) -> Result<()>
fn verify_password(&self, password: &[u8], hash: &PasswordHashRef) -> Result<()>
Compute this password hashing function against the provided password
using the parameters from the provided password hash and see if the
computed output matches.
impl Copy for Yescrypt
impl Eq for Yescrypt
impl StructuralPartialEq for Yescrypt
Auto Trait Implementations§
impl Freeze for Yescrypt
impl RefUnwindSafe for Yescrypt
impl Send for Yescrypt
impl Sync for Yescrypt
impl Unpin for Yescrypt
impl UnwindSafe for Yescrypt
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