4 releases
Uses old Rust 2015
0.1.3 | Sep 26, 2017 |
---|---|
0.1.2 | Sep 26, 2017 |
0.1.1 | Sep 26, 2017 |
0.1.0 | Sep 26, 2017 |
#15 in #bcrypt
64KB
1.5K
SLoC
bcrypt-bsd
Rust interface to the C bcrypt library, fully compatible with OpenBSD bcrypt.
lib.rs
:
Rust wrapper around the BCrypt hashing algorithm implementation written in C.
The C implementation is embedded into this crate and compiled using build script.
Example
use bcrypt_bsd::{gen_salt, hash, to_str};
let salt = gen_salt(12).unwrap();
let bcrypt_hash = hash("Password", &salt).unwrap();
println!("bcrypt salt: {}", to_str(&salt).unwrap());
println!("bcrypt hash: {}", to_str(&bcrypt_hash).unwrap());
Dependencies
~330–570KB