标签归档:rsa

Java/Android RSA使用时注意补位

java

Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); 

android

Cipher cipher = Cipher.getInstance("RSA/ECB/NoPadding");
Cipher cipher = Cipher.getInstance("RSA/None/PKCS1Padding"); 

参考:
 
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
继续阅读

发表在 java | 标签为 | Java/Android RSA使用时注意补位已关闭评论