问题
I am working in one of my android project in which I have used Shared preference. Recently I found that you can see Shared preference values if you root your device. so basically Shared preference is not secure any more. can anyone suggest me what is the best way to encrypt/decrypt Shared preference values? if there any good libraries? I have seen many solutions to encrypt/decrypt Shared preference but no one looks secure. Any suggestions please?
回答1:
The data can be accessed and manipulated by any App. But you have to consider that only a very small percentage (I guess under 1-2%, but there is no reliable data on the interweb) of devices are rooted and if a user roots his device he/she deliberately leaves himself vulnerable. This is not an Android system setting, if you root, you are responsible for the consequences. Click the Link Hope this link will help you.
来源:https://stackoverflow.com/questions/32250776/secure-way-to-encrypt-decrypt-shared-preference-in-android