scottyab / secure-preferences

Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure.
1.53k stars 235 forks source link

Ensure we always return a String in getString #65

Closed aeoris closed 6 years ago

aeoris commented 7 years ago

There's some corner cases where getString may return a null value even when the defaultValue is a String. While I could not reproduce this behaviour, this is a known issue (#38) and possible in the code, as decrypt may return a null value in certain situations.

aenonGit commented 6 years ago

@scottyab any news on this? I'm having issue with some samsung devices getting null from getString().isEmpty()

scottyab commented 6 years ago

Sorry it's take so long to get to this. I really appreciate the contributions! I'm planning some big changes over next few days to make secure preferences easier to extend.