diff options
Diffstat (limited to 'src/bin/crypto.rs')
-rw-r--r-- | src/bin/crypto.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/bin/crypto.rs b/src/bin/crypto.rs deleted file mode 100644 index 775ea07..0000000 --- a/src/bin/crypto.rs +++ /dev/null @@ -1,19 +0,0 @@ -extern crate crypto; -extern crate systemhttp; - -use crypto::bcrypt_pbkdf::bcrypt_pbkdf; - -pub fn encode(pw: &str) -> Vec<u8> { - let salt = "hello"; - let mut out = vec!(0; 32); - let encrypted = bcrypt_pbkdf(pw.as_bytes(), salt.as_bytes(), 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); -} |