diff options
Diffstat (limited to 'src/bin/crypto.rs')
-rw-r--r-- | src/bin/crypto.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/crypto.rs b/src/bin/crypto.rs index e059663..5cc8549 100644 --- a/src/bin/crypto.rs +++ b/src/bin/crypto.rs @@ -1,4 +1,5 @@ extern crate crypto; +extern crate systemhttp; use crypto::bcrypt_pbkdf::bcrypt_pbkdf; @@ -7,12 +8,14 @@ pub fn encode(pw: &str) -> Vec<u8> { let mut out = vec!(0; 32); let encrypted = bcrypt_pbkdf( pw.as_bytes(), salt.as_bytes(), - 100, &mut out); + 10, &mut out); out } pub fn main() { let pw = "123"; let out = encode(pw); + let out2 = systemhttp::auth::encode(pw); println!("{}: {:?}", pw, out); + println!("{}: {:?}", pw, out2); } |