1 2 3 4 5 6 7 8 9 10
extern crate libpasta; use libpasta::primitives::Bcrypt; fn main() { let config = libpasta::Config::with_primitive(Bcrypt::new(15)); let password_hash = config.hash_password("hunter2"); println!("The hashed password is: '{}'", password_hash); // Prints bcrypt hash }