-->
-->
Install bouncycastle JCE
Install bouncycastle JCE should follow the steps below :
1) download provider
As above,bouncycastle can download from the www.bouncycastle.org, download it after the solution
Compression.
2 Copy the JAR file to the appropriate location
If you want class can be all java application use, we need to put jar file installed as an extension. bouncycastle provider is not used to install as an extended jar file, but it's easy to build. First, the downloaded file is expanded to jdkclasses " " /span>
C:> jar CVF Bouncycastle.jar javax org
In Windows ,Java is typically installed in two directories. One directory for development, including all JDK tools, and the other is just a running environment. The JDK itself is typically located in c:jdk1.3 such as the jdk, which is typically located in a directory such as C:Program filesJavaSoftJRE1.3, which has an extended directory of libraries. respectively: C:jdk1.3.1libext and C:Program Filesjavasoftjre1.3libext, put the desired jar file in the corresponding directory.
3) Configure the Security properties file
The security properties file Java.security is located under another directory libsecurity that is parallel to Libext, which defines the cryptographic providers that are currently available. If you see the following statement:
Security.provider.1=sun.security.provider.sun
Security.provider.2=com.sun.rsajca.provider
It shows that this virtual machine has two cryptographic providers and their priorities and the names that are used when they are accessed. When a cryptographic algorithm is needed, the virtual opportunity accesses the providers listed here, searching for the desired algorithm, and using the first found algorithm in order of precedence here.
We should insert the following line in the file to add the new provider:
Security.provider.3=org.bouncycastle.jce.provider.bouncycastleprovider
Of course , you can also remove the previous cryptographic provider configuration so that you cannot use the JDK default cryptographic provider.
4 test the installation of a good program
We can write a test program (using the API of the JCE package) to determine whether our installation was successful or not.
The installation is successful , let us enter the fun world with Bouncycastle JCE to realize the security function !
-->
-->