import java.security.*;
import java.util.*;
/**
* Class GetProviderInfo
* Description: This is an example of
* retrieving providers
*/
class GetProviderInfo
{
public static void main(String[] args)
{
System.out.println("Providers installed on your system:");
System.out.println("-----------------------------------");
Provider[] providerList = Security.getProviders();
for (int i = 0; i < providerList.length; i++)
{
System.out.println("[" + (i + 1) + "] - Provider name: " + providerList[i].getName());
System.out.println("Provider version number: " + providerList[i].getVersion());
System.out.println("Provider information:\n" + providerList[i].getInfo());
for (String key: providerList[i].stringPropertyNames()) {
System.out.println("\t" + key +"\t" + providerList[i].getProperty(key));
}
System.out.println("-----------------------------------");
}
}

}