1 19 20 package com.sslexplorer.security; 21 22 25 public class PasswordCredentials implements Credentials { 26 27 private char[] password; 28 private String username; 29 32 public PasswordCredentials(String username, char[] password) { 33 this.username = username; 34 this.password = password; 35 } 36 37 public char[] getPassword() { 38 return password; 39 } 40 41 public String getUsername() { 42 return username; 43 } 44 45 public boolean equals(Object arg0) { 46 47 if(arg0 instanceof PasswordCredentials) { 48 PasswordCredentials tmp = (PasswordCredentials) arg0; 49 if (this.username.equals(tmp.username)){ 50 if (this.password.equals(tmp.password)){ 51 return true; 52 } 53 } 54 } 55 56 return false; 57 } 58 59 60 } 61 | Popular Tags |