Trait argon2::PasswordHasher[][src]

pub trait PasswordHasher {
    type Params: Clone + TryInto<ParamsString> + for<'a> TryFrom<&'a ParamsString> + Default + Debug;
    pub fn hash_password(
        &self,
        password: &[u8],
        algorithm: Option<Ident<'a>>,
        version: Option<u32>,
        params: Self::Params,
        salt: Salt<'a>
    ) -> Result<PasswordHash<'a>, HasherError>; pub fn hash_password_simple(
        &self,
        password: &[u8],
        salt: &'a str
    ) -> Result<PasswordHash<'a>, HasherError> { ... } }
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.

Loading content...

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]

Compute a PasswordHash with the given algorithm Ident (or None for the recommended default), password, salt, and parameters.

Loading content...

Provided methods

pub fn hash_password_simple(
    &self,
    password: &[u8],
    salt: &'a str
) -> Result<PasswordHash<'a>, HasherError>
[src]

Simple API for computing a PasswordHash from a password and Salt value.

Uses the default recommended parameters for a given algorithm.

Loading content...

Implementors

impl PasswordHasher for Argon2<'_>[src]

type Params = Params

Loading content...