encrypted-userprefs icon indicating copy to clipboard operation
encrypted-userprefs copied to clipboard

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

Open shimitapiro opened this issue 11 years ago • 3 comments

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

shimitapiro avatar Mar 17 '14 17:03 shimitapiro

Same here. Really annoying

Benjamin1333 avatar May 22 '14 08:05 Benjamin1333

Any updates here please?

mnr-moustafa avatar Aug 22 '16 01:08 mnr-moustafa

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.

oshamahue avatar Jan 31 '17 08:01 oshamahue