[英]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.