-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListProviders.java
More file actions
24 lines (22 loc) · 789 Bytes
/
Copy pathListProviders.java
File metadata and controls
24 lines (22 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Original code from:
// http://www.java2s.com/Code/Java/Security/ListAllProviderAndItsAlgorithms.htm
// The work gets done using Security.getProviders();
// http://download.oracle.com/javase/6/docs/api/java/security/Security.html#getProviders%28%29
// Edit for linter
import java.security.Provider;
import java.security.Security;
import java.util.Enumeration;
public class ListProviders {
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);
}
}
}