Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. private static boolean isPasswordCorrect(char[] input,char[] correctPassword) {
  2. boolean isCorrect = true;
  3. //char[] correctPassword = {};
  4.  
  5. if (input.length != correctPassword.length || input == null) {
  6. isCorrect = false;
  7. } else {
  8. isCorrect = Arrays.equals (input, correctPassword);
  9. }
  10.  
  11. //Zero out the password.
  12. Arrays.fill(correctPassword,'0');
  13.  
  14. return isCorrect;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement