Get Provider Info : Provider « Security « Java Tutorial

Java Tutorial
1. Language
2. Data Type
3. Operators
4. Statement Control
5. Class Definition
6. Development
7. Reflection
8. Regular Expressions
9. Collections
10. Thread
11. File
12. Generics
13. I18N
14. Swing
15. Swing Event
16. 2D Graphics
17. SWT
18. SWT 2D Graphics
19. Network
20. Database
21. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web Services SOA
27. EJB3
28. Spring
29. PDF
30. Email
31. J2ME
32. J2EE Application
33. XML
34. Design Pattern
35. Log
36. Security
37. Apache Common
38. Ant
39. JUnit
Java
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Tutorial » Security » Provider 
36. 34. 7. Get Provider Info
import java.security.Provider;
import java.security.Security;

public class MainClass {
  public static void main(String[] args) {
    System.out.println("Providers installed on your system:");
    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());
    }
  }
}
/*Providers installed on your system:
[1] - Provider name: SUN
Provider version number: 1.6
Provider information:
SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
[2] - Provider name: SunRsaSign
Provider version number: 1.5
Provider information:
Sun RSA signature provider
[3] - Provider name: SunJSSE
Provider version number: 1.6
Provider information:
Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
[4] - Provider name: SunJCE
Provider version number: 1.6
Provider information:
SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
[5] - Provider name: SunJGSS
Provider version number: 1.0
Provider information:
Sun (Kerberos v5, SPNEGO)
[6] - Provider name: SunSASL
Provider version number: 1.5
Provider information:
Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
[7] - Provider name: XMLDSig
Provider version number: 1.0
Provider information:
XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory)
[8] - Provider name: SunPCSC
Provider version number: 1.6
Provider information:
Sun PC/SC provider
[9] - Provider name: SunMSCAPI
Provider version number: 1.6
Provider information:
Sun's Microsoft Crypto API provider
*/
36. 34. Provider
36. 34. 1. Security.getProviders()
36. 34. 2. Listing All Available Cryptographic Services
36. 34. 3. Return the available implementations for a service type
36. 34. 4. Get cryptographic security providers
36. 34. 5. Get a Provider
36. 34. 6. List the available capabilities for ciphers, key agreement, macs, message digests, signatures and other objects in the BC provider.
36. 34. 7. Get Provider Info
36. 34. 8. extends java.security.Provider
36. 34. 9. extends Provider
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.