Beispiel #1
0
 public boolean isPasswordValid(String inputPassword) {
   return PasswordHash.validatePassword(
       inputPassword.toCharArray(),
       PasswordHash.PBKDF2_ITERATIONS,
       this.salt,
       this.hashedPassword);
 }
Beispiel #2
0
 public void hashPassword(String password) {
   HashingResult hashingResult = PasswordHash.createHash(password);
   this.hashedPassword = hashingResult.hash;
   this.salt = hashingResult.salt;
 }