简体   繁体   English

RSA / NONE / PKCS1Padding给出错误,如java.security.NoSuchAlgorithmException

[英]RSA/NONE/PKCS1Padding giving error as java.security.NoSuchAlgorithmException

I am using "RSA/None/PKCS1Padding" as : 我正在使用“ RSA / None / PKCS1Padding”作为:

Cipher RSACipher = Cipher.getInstance("RSA/None/PKCS1Padding");

This gives me exception as : 这给了我例外:

java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/None/PKCS1Padding

Thanks for help. 感谢帮助。

Try "RSA/ECB/PKCS1Padding" instead if you are running in an Oracle or Open JDK. 如果您正在Oracle或Open JDK中运行,请尝试尝试使用"RSA/ECB/PKCS1Padding" It does not make too much sense to use a block cipher mode of encryption with RSA, but not all algorithm names are logical within the Java SE providers. 在RSA中使用块密码模式的加密没有太大意义,但并非所有算法名称在Java SE提供程序中都是合乎逻辑的。

The Bouncy Castle Libraries support "RSA/None/PKCS1Padding" though. 不过, "RSA/None/PKCS1Padding"城堡图书馆支持"RSA/None/PKCS1Padding" So maybe the code was written for Bouncy or Android. 因此,也许代码是为Bouncy或Android编写的。

暂无
暂无

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

相关问题 java.security.NoSuchAlgorithmException:在 jar 文件中找不到任何支持 RSA/NONE/PKCS1Padding 的提供程序 - java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/PKCS1Padding in jar-file java.security.NoSuchAlgorithmException:AES / ECB / PKCS5Padding - java.security.NoSuchAlgorithmException: AES/ECB/PKCS5Padding java.security.NoSuchAlgorithmException: RSA 签名不可用 - java.security.NoSuchAlgorithmException: RSA Signature not available .java.security.NoSuchAlgorithmException:提供者Cryptix不提供算法RSA / PKCS1 - .java.security.NoSuchAlgorithmException: algorithm RSA/PKCS1 is not available from provider Cryptix java.security.NoSuchAlgorithmException:找不到任何支持 AES/ECB/PKCS7PADDING 的提供商 - java.security.NoSuchAlgorithmException:Cannot find any provider supporting AES/ECB/PKCS7PADDING java.security.NoSuchAlgorithmException:找不到支持Blowfish / ECB / PKCS5Padding的任何提供程序 - java.security.NoSuchAlgorithmException: Cannot find any provider supporting Blowfish/ECB/PKCS5Padding 使用RSA / ECB / PKCS1Padding进行.Net加密和Java解密 - .Net encryption and java decryption with RSA/ECB/PKCS1Padding SSL java.security.NoSuchAlgorithmException - SSL java.security.NoSuchAlgorithmException .NET 等效于 Java KeyFactory.getInstance "RSA"/"RSA/ECB/PKCS1Padding" - .NET equivalent of Java KeyFactory.getInstance "RSA"/"RSA/ECB/PKCS1Padding" Java和SSL - java.security.NoSuchAlgorithmException - Java and SSL - java.security.NoSuchAlgorithmException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM