Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static boolean isPasswordCorrect(char[] input,char[] correctPassword) {
- boolean isCorrect = true;
- //char[] correctPassword = {};
- if (input.length != correctPassword.length || input == null) {
- isCorrect = false;
- } else {
- isCorrect = Arrays.equals (input, correctPassword);
- }
- //Zero out the password.
- Arrays.fill(correctPassword,'0');
- return isCorrect;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement