Created
August 17, 2010 20:06
-
-
Save nicoulaj/531761 to your computer and use it in GitHub Desktop.
List all Java Security providers and algorithms available in the environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.Provider; | |
import java.security.Security; | |
import java.util.Enumeration; | |
public class SecurityProvidersAndAlgorithms { | |
public static void main(String[] args) throws Exception { | |
try { | |
Provider p[] = Security.getProviders(); | |
for (int i = 0; i < p.length; i++) { | |
System.out.println(p[i]); | |
for (Enumeration e = p[i].keys(); e.hasMoreElements();) | |
System.out.println("\t" + e.nextElement()); | |
} | |
} catch (Exception e) { | |
System.out.println(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment