code: def encode(password, algorithm, salt, iterations):
      
      hash = hashlib.pbkdf2_hmac(digest().name, password.encode(), salt.encode(), iterations)
      encoded = base64.b64encode(hash).decode('ascii').strip()
      return "%s$%d$%s$%s" % (algorithm, iterations, salt, encoded)
docs: Encode a Password
      :param password: Password
      :param algorithm
      :param salt: Salt
      :param iterations: iterations
      :return: PBKDF2 hashed Password