code: def alg2keytype(alg):
      
      if not alg or alg.lower() == "none":
          return "none"
      elif alg.startswith("RS") or alg.startswith("PS"):
          return "RSA"
      elif alg.startswith("HS") or alg.startswith("A"):
          return "oct"
      elif alg.startswith("ES") or alg.startswith("ECDH-ES"):
          return "EC"
      else:
          return None
docs: Go from algorithm name to key type.
  
      :param alg: The algorithm name
      :return: The key type