Get cryptographic security providers : Provider « Security « Java Tutorial






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<Object> result = new HashSet<Object>();
    Provider[] providers = Security.getProviders();
    for (Provider provider : providers) {
      Set<Object> 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);
    }
  }
}








36.34.Provider
36.34.1.Security.getProviders()
36.34.2.Listing All Available Cryptographic Services
36.34.3.Return the available implementations for a service type
36.34.4.Get cryptographic security providers
36.34.5.Get a Provider
36.34.6.List the available capabilities for ciphers, key agreement, macs, message digests, signatures and other objects in the BC provider.
36.34.7.Get Provider Info
36.34.8.extends java.security.Provider
36.34.9.extends Provider