chris-piekarski
9/23/2014 - 5:22 PM

Listing all JCE providers and the algorithms they support

Listing all JCE providers and the algorithms they support



Provider[] providers = Security.getProviders();
for (Provider p : providers) {
  System.out.printf("%s/%s/%f\n", p.getName(), p.getInfo(),
  p.getVersion());
  Set<Service> services = p.getServices();
  for (Service s : services) {
    System.out.printf("\t%s/%s/%s\n", s.getType(),
    s.getAlgorithm(), s.getClassName());
  }
}