xcrypt 0.3.1

Bindings for libxcrypt
Documentation

libxcrypt-rs

Rust bindings for libxcrypt

Usage

Add xcrypt to your Cargo.toml:

cargo add xcrypt

Hash a phrase with the best available hashing method and default parameters:

use xcrypt::{crypt, crypt_gensalt};

fn main() {
    let setting = crypt_gensalt(None, 0, None).unwrap();
    let hashed_phrase = crypt("hello", &setting).unwrap();

    println!("{hashed_phrase}");
}