code: public static boolean checkPassword(String plaintext, String storedHash) {
          boolean password_verified;
          if (null == storedHash || !storedHash.startsWith("$2a$"))
              throw new IllegalArgumentException("Invalid hash provided for comparison");
          password_verified = BCrypt.checkpw(plaintext, storedHash);
          return (password_verified);
      }
docs: This method can be used to verify a computed hash from a plaintext (e.g. during a login
  request) with that of a stored hash from a database. The password hash from the database
  must be passed as the second variable.
  
  @param plaintext  The account's plaintext password, as provided during a login request
  @param storedHash The account's stored password hash, retrieved from the authorization database
  @return boolean - true if the password matches the password of the stored hash, false otherwise