code: public boolean check(char[] plain, char[] database, byte[] salt) {
  
      checkNotNull(plain);
      checkArgument(plain.length != 0, "Plain must not be empty.");
      checkNotNull(database);
      checkArgument(database.length != 0, "Database must not be empty.");
      checkNotNull(salt);
      checkArgument(salt.length != 0, "Salt must not be empty.");
  
      char[] hashedPlain = this.hash(plain, salt);
      return Arrays.equals(hashedPlain, database);
    }
docs: Checks if the given plain password matches the given password hash
  
  @param plain the plain text password.
  @param database the hashed password from the database.
  @param salt the salt used for the hashed password.
  @return true if the passwords match, false if not.