/// Type-safe function to compute the hash of a password.
Type-safe function to compute the hash of a password.
Type - safe function to compute the hash of a password .
pub fn hash(&self, password: &str) -> Output {
        let salt = super::gen_salt(&*config::RANDOMNESS_SOURCE);
        let output = self.hash_with_salt(password.as_bytes(), &salt);
        Output {
            hash: output,
            salt,
            alg: self.clone(),
        }
    }
pub fn hash ( & self , password : & str ) -> Output { let salt = super :: gen_salt ( & * config :: RANDOMNESS_SOURCE ) ; let output = self . hash_with_salt ( password . as_bytes ( ) , & salt ) ; Output { hash : output , salt , alg : self . clone ( ) , } }
Type-safe function to compute the hash of a password.
Type - safe function to compute the hash of a password .
&self
password
&str