Forked from nicoulaj/SecurityProvidersAndAlgorithms.java
Created
December 4, 2019 18:53
-
-
Save kennwhite/0b450d2d6260874e47ccca48ab5bc158 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