crypt

Function crypt 

Source
pub fn crypt(phrase: &str, setting: &str) -> Result<String, Error>
Expand description

Irreversibly hash phrase for storage in the system password database (shadow(5)) using a cryptographic hashing method.

Internally, this calls crypt_r so that this function can be safely called from multiple threads at the same time.