博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Support by Bouncy Castle
阅读量:5923 次
发布时间:2019-06-19

本文共 1252 字,大约阅读时间需要 4 分钟。

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 ,  type and version should choose by your current case, here i will choose java and which lastest java releases -- .
 
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:
InBlock.gifC:\Program Files\Java\jre1.6.0_07\lib\security
 
Debin:
InBlock.gif/usr/local/jre1.6.0_14/lib/security
 
And add the BC provider
InBlock.gifsecurity.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 " "
 
 
    本文转自danni505 51CTO博客,原文链接:http://blog.51cto.com/danni505/175688,如需转载请自行联系原作者
你可能感兴趣的文章
C++学习之路: 时间戳 封装成类
查看>>
Python学习笔记(14)-私有属性、私有方法
查看>>
WPF入门教程系列一——基础
查看>>
List实现行转列的通用方案
查看>>
云计算:前景美好风险巨大 盈利尚需五年
查看>>
C语言之指针与数组总结
查看>>
深入理解Java内存模型(四)——volatile
查看>>
后台提示
查看>>
2018-2019-2 20165302 《网络对抗技术》Exp3 免杀原理与实践
查看>>
二维码以流的形式输出到界面,并打印不保存到本地
查看>>
Matlab DIP(瓦)ch5图像复原练习
查看>>
Overlapped I/O
查看>>
HDU - 1051 Wooden Sticks 贪心 动态规划
查看>>
ios 利用cocapods创建私有库
查看>>
花儿朵朵
查看>>
负载均衡之Haproxy配置详解(及httpd配置)
查看>>
sort()方法和binarySearch()方法
查看>>
Swift注释
查看>>
MS SQLSERVER 一次性删除所有表以及视图等等
查看>>
java urldecode.decode“+”变空格
查看>>