简体   繁体   English

java.security.NoSuchAlgorithmException:找不到支持Blowfish / ECB / PKCS5Padding的任何提供程序

[英]java.security.NoSuchAlgorithmException: Cannot find any provider supporting Blowfish/ECB/PKCS5Padding

I have upgraded to jdk1.8.0_131 from jdk1.8.0_121 (jre as well) by uninstalling older and installing newer jdk and encryption code stopped to work. 我已通过卸载较旧的jdk和安装较新的jdk从jdk1.8.0_121 (以及jre)升级到jdk1.8.0_131 ,并且加密代码停止工作。

Source code : http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#BlowKeyEx 源代码: http : //docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#BlowKeyEx

Error in eclipse : 日食错误:

Exception in thread "main" java.security.NoSuchAlgorithmException: Blowfish KeyGenerator not available
    at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:169)
    at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:223)
    at com.encrypt_app.BlowfishKey.main(BlowfishKey.java:12)

Working without any error if run without IDE. 如果在没有IDE的情况下运行,则不会出现任何错误。

Steps I taken: 我采取的步骤:

  1. Went to Windows > Preferences > Installed JREs and changed Directory to C:\\Program Files\\Java\\jdk1.8.0_131 . 转到Windows > Preferences > Installed JREs ,并将目录更改为C:\\Program Files\\Java\\jdk1.8.0_131 Ensured Build Path setting of project. 确保项目的构建路径设置。

  2. Tried restart eclipse, clean, refresh project. 尝试重新启动Eclipse,清理并刷新项目。

  3. Updated JAVA_HOME to C:\\Program Files\\Java\\jdk1.8.0_131 将JAVA_HOME更新为C:\\Program Files\\Java\\jdk1.8.0_131

-- Run same code without IDE and it worked. -在没有IDE的情况下运行相同的代码,并且可以正常工作。

  1. Started eclipse with -clean argument (edited eclipse.ini) 使用-clean参数启动eclipse(编辑eclipse.ini)

从构建路径中删除库,然后使用更新的JRE重新添加。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.security.NoSuchAlgorithmException:找不到任何支持 AES/ECB/PKCS7PADDING 的提供商 - java.security.NoSuchAlgorithmException:Cannot find any provider supporting AES/ECB/PKCS7PADDING java.security.NoSuchAlgorithmException:AES / ECB / PKCS5Padding - java.security.NoSuchAlgorithmException: AES/ECB/PKCS5Padding java.security.NoSuchAlgorithmException:在 jar 文件中找不到任何支持 RSA/NONE/PKCS1Padding 的提供程序 - java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/PKCS1Padding in jar-file junit java.security.NoSuchAlgorithmException:找不到任何支持的提供程序 - junit java.security.NoSuchAlgorithmException: Cannot find any provider supporting java.security.NoSuchAlgorithmException:找不到任何支持AES的提供程序 - java.security.NoSuchAlgorithmException:cannot find any provider supporting AES java.security.NoSuchAlgorithmException:提供者SunJCE不提供DES / ECB / NoPadding - java.security.NoSuchAlgorithmException: Provider SunJCE does not provide DES/ECB/NoPadding RSA / NONE / PKCS1Padding给出错误,如java.security.NoSuchAlgorithmException - RSA/NONE/PKCS1Padding giving error as java.security.NoSuchAlgorithmException .java.security.NoSuchAlgorithmException:提供者Cryptix不提供算法RSA / PKCS1 - .java.security.NoSuchAlgorithmException: algorithm RSA/PKCS1 is not available from provider Cryptix 用Java解密/解密“AES / ECB / PKCS5Padding” - En-/decrypt “AES/ECB/PKCS5Padding” in Java Java到ruby的AES / ECB / PKCS5Padding加密 - Java to ruby AES/ECB/PKCS5Padding encryption
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM