Trait argon2::PasswordHasher [−][src]
This is supported on crate feature
password-hash
only.Trait for password hashing functions.
Associated Types
type Params: Clone + TryInto<ParamsString> + for<'a> TryFrom<&'a ParamsString> + Default + Debug
[src]
Algorithm-specific parameters.
Required methods
pub fn hash_password(
&self,
password: &[u8],
algorithm: Option<Ident<'a>>,
version: Option<u32>,
params: Self::Params,
salt: Salt<'a>
) -> Result<PasswordHash<'a>, HasherError>
[src]
&self,
password: &[u8],
algorithm: Option<Ident<'a>>,
version: Option<u32>,
params: Self::Params,
salt: Salt<'a>
) -> Result<PasswordHash<'a>, HasherError>
Compute a PasswordHash
with the given algorithm Ident
(or None
for the recommended default), password, salt, and
parameters.
Provided methods
pub fn hash_password_simple(
&self,
password: &[u8],
salt: &'a str
) -> Result<PasswordHash<'a>, HasherError>
[src]
&self,
password: &[u8],
salt: &'a str
) -> Result<PasswordHash<'a>, HasherError>
Simple API for computing a PasswordHash
from a password and
Salt
value.
Uses the default recommended parameters for a given algorithm.