Wednesday, January 20, 2010

Show Java Crypto Provider

Recently I work on the project that need to use JCE library and Bouncy Castle Crypto library. After that library instation, we need to check the crypto provider that available in jre

Code as below :


class ShowCryptoProviders
public static void main(String []args)
{ Provider [] providers = Security.getProviders();

for(int i=0; i less than providers.length; i++)

The console output :

SUN version 1.6
SunRsaSign version 1.7
SunJSSE version 1.6
SunJCE version 1.7
SunJGSS version 1.0
SunSASL version 1.5
XMLDSig version 1.0
SunPCSC version 1.6
BC version 1.45

These result exactly the same with /etc/java-6-openjdk/security/

# List of providers and their preference orders (see above):

No comments:

Post a Comment