New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will it support encryption? #72
Comments
I have no plan to support encryption. Example object EncryptedData : KotprefModel() {
private val encryption = Encryption(Encryption.getDefaultCipher(), byteArrayOf(...))
private var encryptedFoo by stringPref("")
fun getFoo(): String =
if (encryptedFoo.isEmpty()) {
""
} else {
encryption.decrypt(encryptedFoo)
}
fun setFoo(foo: String) {
if (foo.isNotEmpty()) {
encryptedFoo = encryption.encrypt(foo)
}
}
} I think that you can use any other library you want. |
Thanks, I will look at it |
But, if I use this library to encrypt. How can I encrypt the Object, is there any interface to operate the gson string? Please and thank you |
And @chibatching |
Of course it's ok, but I will try to create interface to inject custom converter (e.g. #42) to Kotpref at next major version. |
Well, good |
Hi, this is a great open library
but, will it support encryption?
That must be better
The text was updated successfully, but these errors were encountered: