Expand description
Bindings for libxcrypt.
§Examples
Hash a phrase with the best available hashing method and default parameters:
use xcrypt::{crypt, crypt_gensalt};
let setting = crypt_gensalt(None, 0, None).unwrap();
crypt("hello", &setting);
You can also explicitly request a specific hashing method:
use xcrypt::{crypt, crypt_gensalt};
let setting = crypt_gensalt(Some("$6$"), 0, None).unwrap();
crypt("hello", &setting);
Enums§
Functions§
- crypt
- Irreversibly hash
phrase
for storage in the system password database (shadow(5)) using a cryptographic hashing method. - crypt_
gensalt - Compile a string for use as the setting argument to crypt.