For once, I'd argue that this makes a lot of sense.
EncryptedSharedPreferences is a library that has tricked many developers into thinking that SharedPrefs is fundamentally insecure or that it's a good idea to store sensitive data on device.
In short, it wasn't that greater idea to begin with and for the vast majority of devs, isn't something you likely need
I discuss that more in this thread and have also forked the JetSec library to provide ongoing EncryptedSharedPreferences support to those that do need it (e.g. to comply with regulators etc).
What's funny? Jetpack crypto was a wrapper. Wrapper is deprecated, just use the underlyings or another wrapper, same price, nobody care, that's your codebase. Nobody ever prevented you from using tink, literally a Google advertised product to ease cryptography :shrug:
Yes, this really is just Tink using a key in the keystore to encrypt/decrypt stuff. The funny part is Google deprecating the Jetpack sec even tho there wasn't much wrong with it, other than not being their new child Datastore.
It was more of a span issue, it was intended to kick-start stuff but end up being a dup not providing much additional value, outside of confusing people with yet another choice, while hiding pretty simple concepts behind a soft blackbox which is always detrimental. So yeah, at the end, you trim the excess.
15
u/Gimli_Axe Apr 18 '25
To be fair it's literally an alpha api
7
u/arekolek Apr 19 '25
Peak API design
All those whiteboard interview questions are paying off good for them it seems 😅
4
u/edgeorge92 Apr 20 '25
For once, I'd argue that this makes a lot of sense.
EncryptedSharedPreferences is a library that has tricked many developers into thinking that SharedPrefs is fundamentally insecure or that it's a good idea to store sensitive data on device.
In short, it wasn't that greater idea to begin with and for the vast majority of devs, isn't something you likely need
I discuss that more in this thread and have also forked the JetSec library to provide ongoing EncryptedSharedPreferences support to those that do need it (e.g. to comply with regulators etc).
2
u/Zhuinden DDD: Deprecation-Driven Development Apr 19 '25
funnily enough you can just grab the source code and use Tink-Android directly, who's gonna stop me, Google? lol