Struct pwhash::HashSetup [] [src]

pub struct HashSetup<'a> {
    pub salt: Option<&'a str>,
    pub rounds: Option<u32>,
}

Setup struct for basic hashing customization.

All implemented hash functions accept a custom salt value. If set to None, a random salt will be generated. The usage of rounds varies with the algorithm; visit the algorithm's module-level documentation for details. It's always safe to initialize rounds to None, in which case the suitable default value will be used.

Fields

salt: Option<&'a str>

Custom salt.

rounds: Option<u32>

Number of rounds.

Trait Implementations

impl<'a> IntoBcryptSetup<'a> for HashSetup<'a>
[src]

fn into_bcrypt_setup(self) -> Result<BcryptSetup<'a>>

The conversion function.

impl<'a> IntoHashSetup<'a> for HashSetup<'a>
[src]

fn into_hash_setup(self, _f: fn(&'a str) -> Result<HashSetup<'a>>) -> Result<HashSetup<'a>>

The conversion function.