about summary refs log tree commit diff
path: root/kittybox-rs
diff options
context:
space:
mode:
Diffstat (limited to 'kittybox-rs')
-rw-r--r--kittybox-rs/examples/password-hasher.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/kittybox-rs/examples/password-hasher.rs b/kittybox-rs/examples/password-hasher.rs
index 2cba606..f11c591 100644
--- a/kittybox-rs/examples/password-hasher.rs
+++ b/kittybox-rs/examples/password-hasher.rs
@@ -3,8 +3,8 @@ use std::io::Write;
 use argon2::{Argon2, password_hash::{rand_core::OsRng, PasswordHasher, PasswordHash, PasswordVerifier, SaltString}};
 
 fn main() -> std::io::Result<()> {
-    print!("Type a password: ");
-    std::io::stdout().flush().unwrap();
+    eprint!("Type a password: ");
+    std::io::stderr().flush().unwrap();
     let password = {
         let mut s = String::new();
         std::io::stdin().read_line(&mut s)?;
@@ -14,7 +14,7 @@ fn main() -> std::io::Result<()> {
     
     let salt = SaltString::generate(&mut OsRng);
     let argon2 = Argon2::default();
-    println!("{}", password.trim());
+    //eprintln!("{}", password.trim());
     let password_hash = argon2.hash_password(password.trim().as_bytes(), &salt)
         .expect("Hashing a password should not error out")
         .serialize();