Support by Bouncy Castle

简介:
Have you ever met this Exception like "Cryptography - JCE cannot authenticate provider BC"? and by now you don't know how to deal with it?  If you all say "yes",  Congratulations! Your have came the  right place.
 
Follow me, i will give you the answer and tell you why should do like this.
 
Solution
 
1. DownLoad BC
You can download this lib form www.bouncycastle.org,  type and version should choose by your current case, here i will choose java and which lastest java releases -- bcprov-jdk16-143.jar.
 
2. Deploy BC to JRE/JDK
Copy this lib to your JRE/JDK base lib directory, for example
as to me, which like:
 
XP:
C:\Program Files\Java\jre1.6.0_07\lib\ext
 
Debin:
/usr/local/jre1.6.0_14/lib/ext
 
If you need, you can deploy them to JDK's dir, just as you wish.
 
3.Set JCE Security Provider
Open "java.security" and set the BC provider.
Directory like:
 
XP:
C:\Program Files\Java\jre1.6.0_07\lib\security
 
Debin:
/usr/local/jre1.6.0_14/lib/security
 
And add the BC provider
security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
 
Now, That all of BC part.
 
Addition
As to Java, if you want to use Long key, now you should get the support be JCE,  version should fit to your JDK/JRE. More see my another aritcle "Chapter One:Install EJBCA "
 
 
    本文转自danni505 51CTO博客,原文链接:http://blog.51cto.com/danni505/175688,如需转载请自行联系原作者



相关文章
|
3月前
|
Android开发
解決Android报错:Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
解決Android报错:Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
104 1
|
机器学习/深度学习
1250:The Castle 2021-01-05
1250:The Castle 2021-01-05
|
Android开发 开发者 测试技术
Support Annotation Library注解使用详解
一.Support Annotation Library能做什么 Support Annotation Library包含一系列的元注解,能够帮助开发者在编译期间发现可能存在的Bug,另外Android Studio本身就支持Annotation Library所以开发者无需再次添加依赖。
1212 0
|
JavaScript 前端开发 Java