use argon2::{
    password_hash::{rand_core::OsRng, PasswordHash, PasswordHasher, PasswordVerifier, SaltString},
    Argon2,
};

fn main() {
    // Generate hash for Admin@nxtgauge1
    let password = "Admin@nxtgauge1";
    let salt = SaltString::generate(&mut OsRng);
    let argon2 = Argon2::default();
    let hashed = argon2.hash_password(password.as_bytes(), &salt).unwrap().to_string();
    println!("Generated hash: {}", hashed);
    
    // Verify it
    let parsed_hash = PasswordHash::new(&hashed).unwrap();
    let result = argon2.verify_password(password.as_bytes(), &parsed_hash);
    println!("Verify result: {:?}", result.is_ok());
    
    // Also test with a known hash format from the example
    let known_hash = "$argon2id$v=19$m=19456,t=2,p=1$lNkVG5s+qYFEtzYMqgTfoQ$xlCVvu8mUrVhBudqW1MDbjwcY+Sp6Wbe4vBXZBeaKPI";
    let parsed_known = PasswordHash::new(known_hash);
    println!("Parse known hash result: {:?}", parsed_known.is_ok());
}
