pub struct Scrypt;
This is supported on crate feature
simple
only.Expand description
scrypt type for use with PasswordHasher
.
Trait Implementations
sourceimpl PasswordHasher for Scrypt
impl PasswordHasher for Scrypt
sourcefn hash_password_customized<'a>(
&self,
password: &[u8],
alg_id: Option<Ident<'a>>,
version: Option<Decimal>,
params: Params,
salt: impl Into<Salt<'a>>
) -> Result<PasswordHash<'a>>
fn hash_password_customized<'a>(
&self,
password: &[u8],
alg_id: Option<Ident<'a>>,
version: Option<Decimal>,
params: Params,
salt: impl Into<Salt<'a>>
) -> Result<PasswordHash<'a>>
Compute a PasswordHash
from the provided password using an
explicit set of customized algorithm parameters as opposed to the
defaults. Read more
sourcefn hash_password<S>(
&self,
password: &[u8],
salt: &'a S
) -> Result<PasswordHash<'a>, Error> where
S: AsRef<str> + ?Sized,
fn hash_password<S>(
&self,
password: &[u8],
salt: &'a S
) -> Result<PasswordHash<'a>, Error> where
S: AsRef<str> + ?Sized,
Simple API for computing a PasswordHash
from a password and
salt value. Read more
impl Copy for Scrypt
impl Eq for Scrypt
impl StructuralEq for Scrypt
impl StructuralPartialEq for Scrypt
Auto Trait Implementations
impl RefUnwindSafe for Scrypt
impl Send for Scrypt
impl Sync for Scrypt
impl Unpin for Scrypt
impl UnwindSafe for Scrypt
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
sourceimpl<T> PasswordVerifier for T where
T: PasswordHasher,
impl<T> PasswordVerifier for T where
T: PasswordHasher,
sourcefn verify_password(
&self,
password: &[u8],
hash: &PasswordHash<'_>
) -> Result<(), Error>
fn verify_password(
&self,
password: &[u8],
hash: &PasswordHash<'_>
) -> Result<(), Error>
Compute this password hashing function against the provided password using the parameters from the provided password hash and see if the computed output matches. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more