Hi all, In one of my application , i have to read password in scrambled format, so that no body can see that password in the script. When we run the script, it accept the correct password...
Originally posted by Justin Fox: you could add a keyListener to the textfield...
Or use JPasswordField...
But he said something about a "script", so it's not clear if this is even Java, let alone a Java GUI application. Let's see if he can clear this up for us.
I could be wrong but I think what he means is there's a file on the harddrive with the password saved in it, but he doesn't want that password to be saved in clear text. So if someone sat down at the comp. they wouldn't be able to read the password when looking at the file.
If that's the case, you want to use encryption (probably just hash the password). Look at bouncycastle for a VERY good, free library for doing everything you'll need.