sveinungkb / encrypted-userprefs

A slightly less insecure wrapper for SharedUserPreferences for Android. Keys and values encrypted using a symmetric cipher.
264 stars 80 forks source link

Seeing some of javax.crypto.BadPaddingException: pad block corrupted #1

Open shimitapiro opened 10 years ago

shimitapiro commented 10 years ago

com.app.utils.SecurePreferences$SecurePreferencesException: javax.crypto.BadPaddingException: pad block corrupted at com.app.utils.SecurePreferences.convert(SecurePreferences.java:193) at com.app.utils.SecurePreferences.decrypt(SecurePreferences.java:179) at com.app.utils.SecurePreferences.getString(SecurePreferences.java:136)

Any idea why ? Thanks Shimi

Benjamin1333 commented 10 years ago

Same here. Really annoying

mnr-moustafa commented 8 years ago

Any updates here please?

oshamahue commented 7 years ago

I think I figured out the problem. I was using the secure preferences with dagger as a singleton in a multi threaded env. making the getString and putValue methods synchronized solves the problem.