Function pwhash::sha1_crypt::hash_with
[−]
[src]
pub fn hash_with<'a, IHS, B>(param: IHS, pass: B) -> Result<String> where
IHS: IntoHashSetup<'a>,
B: AsRef<[u8]>,
Hash a password with user-provided parameters.
If the param
argument is a &str
, it must be in the final hash
format. The number of iterations (rounds) and the salt are parsed out
of that value.
If the salt is too long, it is truncated to maximum length. If it contains
an invalid character, an error is returned. An out-of-range rounds value
will also result in an error.