Crates.io | xcrypt |
lib.rs | xcrypt |
version | 0.3.0 |
source | src |
created_at | 2024-10-09 13:27:16.502478 |
updated_at | 2024-10-10 20:29:05.63158 |
description | Bindings for libxcrypt |
homepage | https://github.com/nikstur/libcxcrypt-rs |
repository | https://github.com/nikstur/libcxcrypt-rs |
max_upload_size | |
id | 1402386 |
size | 9,669 |
Rust bindings for libxcrypt
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}");
}