java
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
android
Cipher cipher = Cipher.getInstance("RSA/ECB/NoPadding");
参考:
http://stackoverflow.com/questions/6069369/rsa-encryption-difference-between-java-and-android
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
android
Cipher cipher = Cipher.getInstance("RSA/ECB/NoPadding");
参考:
http://stackoverflow.com/questions/6069369/rsa-encryption-difference-between-java-and-android
http://stackoverflow.com/questions/2956647/rsa-encrypt-with-base64-encoded-public-key-in-android
android中RSA调用方法
// Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); //手动给Cipher.getInstance()的参数修改为"RSA/ECB/PKCS1Padding"就可以和标准java互通了