public static List<Provider> toProviderList(String... providerNames) {
    List<Provider> providers = new ArrayList<>();
    for (String s : providerNames) {
      Provider p = Security.getProvider(s);
      if (p != null) {
        providers.add(p);
      }
    }
    return providers;
  }
Helper function to get a list of Providers from names.
java_src/src/main/java/com/google/crypto/tink/subtle/EngineFactory.java