ZenitechSoftware/Krate

Support for EncryptedSharedPreferences

Closed this issue · 1 comments

It would be nice if Krate supported EncryptedSharedPreferences in a separate artifact. Any plans for this?

You can provide your own SharedPreferences instance for Krate to use, as the Krate interface only defines a property of that type, everything else works off of that. If you pass in an EncryptedSharedPreferences instance, it should work.

The demo app has an example of custom SharedPreferences being set in a Krate: https://github.com/AutSoft/Krate/blob/master/app/src/main/java/hu/autsoft/krateexample/krates/ExampleCustomKrate.kt#L19-L21