Biblioteca Java - Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 mihai 1 /*
2  * Test.java
3  */
4 package lab.scd.encrypt.rsa;
5 import java.security.*;
6 import java.util.*;
7  
8 import org.bouncycastle.jce.provider.BouncyCastleProvider;
9  
10 /**
11  * Class created by @author HULEA Mihai.
12  *
13  * This class is part of the laborator4_2crypto project.
14  * Afiseaza lista JCE providers instalati.
15  */
16 public class Test {
17  
18  public static void main(String[] args){
19  
20 //       Incarca BoncyCastle security provider
21                 try {
22                     Security.addProvider(new BouncyCastleProvider());
23                 }
24                 catch(Exception e) {
25                         System.err.println("Eraoare incarcare security provider (" +e.getMessage() + ")");
26                 }
27  
28   Provider[] providers = Security.getProviders();
29                 for (int i = 0; i < providers.length; i++) {
30                         Provider provider = providers[i];
31                         System.out.println("Provider name: " + provider.getName());
32                         System.out.println("Provider information: " + provider.getInfo());
33                         System.out.println("Provider version: " + provider.getVersion());
34                         System.out.println("- - - ");
35                         Set entries = provider.entrySet();
36                         Iterator iterator = entries.iterator();
37                         while (iterator.hasNext()) {
38                                 System.out.println("Property entry: " + iterator.next());
39                         }
40                 }
41         }
42 }