Java写的RSA算法在WebSphere环境下报错,在本地tomcat下是好的 5
我在做RSA加密算法的时候,需要用128位的加密算法,Ciphercipher=Cipher.getInstance("RSA/ECB/NoPadding");ciphe...
我在做RSA加密算法的时候,需要用128位的加密算法,Cipher cipher = Cipher.getInstance("RSA/ECB/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, pbKey); 在本地运行,Tomcat下都是好的,但是放在 WebSphere6.1 下就会报错如下: [14-8-29 18:37:33:448 CST] 00000372 SystemErr R Caused by: java.security.NoSuchAlgorithmException: Mode: ECB not implemented at com.ibm.crypto.pkcs11.provider.RSA.engineSetMode(Unknown Source) at javax.crypto.Cipher$a_.a(Unknown Source) at javax.crypto.Cipher.getInstance(Unknown Source) 14-8-29 18:37:33:464 CST] 00000372 SystemErr R at com.ibm.crypto.pkcs11.provider.RSA.engineSetMode(Unknown Source) [14-8-29 18:37:33:464 CST] 00000372 SystemErr R at javax.crypto.Cipher$a_.a(Unknown Source) [14-8-29 18:37:33:464 CST] 00000372 SystemErr R ... 6 more [14-8-29 18:37:33:464 CST] 00000372 SystemErr R java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/NoPadding [14-8-29 18:37:33:464 CST] 00000372 SystemErr R at javax.crypto.Cipher.getInstance(Unknown Source) 求大神指点,目前要求用128位的加密,之前用117位的RSA/ECB/PKCS1Padding 或者 RSA 加完密之后,每次加密结果都会变化,求大神指点
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询