A bad padding exception usually means your data has been corrupted in transit.

If you're doing using an intermediate format (e.g. a hex string) you'll need to 
make sure your decoding gives the same result as the originally encoded string.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 

-----Original Message-----
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Sam
Sent: 27 May 2009 12:19
To: Android Developers
Subject: [android-developers] Decrypt in Android using RSA


hi, My question is if i am using RSA as an argument to
Cipher.getInstance method while encryption and while i am decrypting
it with RSA with the RSA/ECB/PKCS1Padding as an argument i am getting
bad padding exception . If i am using RSA only in both the case it is
woring fine but getting some random output not the original string ...
which padding should i use ? Thnx in advance



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to