import java.security.Provider;import java.security.Security;import java.util.HashSet;import java.util.Set;public class Main { public static void main(String[] args) { Set result = new HashSet(); Provider[] providers = Security.getProviders(); for (Provider provider : providers) { Set keys = provider.keySet(); for (Object key : keys) { String data = (String) key; data = data.split(" ")[0]; if (data.startsWith("Alg.Alias")) { data = data.substring(10); } data = data.substring(0, data.indexOf('.')); result.add(data); } } for (Object o : result) { System.out.println("Service Type = " + o); } }}