예제 #1
0
파일: User.java 프로젝트: robbyn/fantastico
 public boolean checkPassword(String password) {
   if (passwordHash == null) {
     throw new IllegalStateException("User password is not set");
   }
   if (password == null) {
     throw new IllegalArgumentException("Null password passed to User.checkPassword");
   }
   String hash = Util.hash(password);
   return hash.equals(passwordHash);
 }
예제 #2
0
파일: User.java 프로젝트: robbyn/fantastico
 public void setPassword(String newValue) {
   passwordHash = Util.hash(newValue);
 }