Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masking password going wrong #11

Open
najihahnizar opened this issue Jan 3, 2019 · 0 comments
Open

Masking password going wrong #11

najihahnizar opened this issue Jan 3, 2019 · 0 comments

Comments

@najihahnizar
Copy link

Hi,all. I have been deadlocked in finding solution for my codes.
I have been searching for three days, almost get what I want. Please review my codes below;

private String promptForText(String prompt, Character mask, DataInputStream in, PrintWriter out) throws Exception {
            String line;
            ConsoleReader consoleReader = new ConsoleReader(in, out);
            line = consoleReader.readLine(prompt, mask);
            return line;
        }

String pwd = promptForText("password:",'*',in,out);

The output I get:
password: f*a*c*t*o*r*y*

Thank You So Much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant