Last active
January 23, 2018 12:45
-
-
Save epequeno/703d039ef7da1cfcf3ac6f431c3bd02a to your computer and use it in GitHub Desktop.
bcrypt in rust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate bcrypt; | |
use bcrypt::{DEFAULT_COST, hash, verify}; | |
fn main() { | |
let hashed = hash("hunter2", DEFAULT_COST).unwrap(); | |
let valid = verify("hunter2", &hashed); | |
println!("{:?}", hashed); | |
println!("{:?}", valid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment