boolean validateUserPasswordHash(byte[] userPasswordHash){
  if (userPasswordHash.length == 0 && passwordHash.length == 0) {
    return true;
  }
  if (userPasswordHash.length == 0) {
    userPasswordHash=SHA256.getKeyPasswordHash(getName(),new char[0]);
  }
  byte[] hash=SHA256.getHashWithSalt(userPasswordHash,salt);
  return Utils.compareSecure(hash,passwordHash);
}

boolean validateUserPasswordHash ( byte [ ] userPasswordHash ) { if ( userPasswordHash . length == 0 && passwordHash . length == 0 ) { return true ; } if ( userPasswordHash . length == 0 ) { userPasswordHash = SHA256 . getKeyPasswordHash ( getName ( ) , new char [ 0 ] ) ; } byte [ ] hash = SHA256 . getHashWithSalt ( userPasswordHash , salt ) ; return Utils . compareSecure ( hash , passwordHash ) ; }
check the password of this user .
