加解密报错——java.lang.SecurityException: JCE cannot authenticate the provider BC

1:在路径(通常linux位置在:/etc/alternatives/jre/lib)
jdk\jre\lib\security中的java.security文件中添加配置(11序号看文件中上一个配置序号,在基础上加1)

security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider

 

 


2:jdk\jre\lib\ext(通常linux位置在/etc/alternatives/jre/lib/ext)中添加bcprov-jdk15on-1.66.jar包

 

 



posted @ 2021-12-23 10:46  a小小程序猿  阅读(5690)  评论(0)    收藏  举报