Is it safe to store username + passwords in a local SQLite db in Android?

前端 未结 2 829
眼角桃花
眼角桃花 2020-12-31 15:57

I\'m at the point where I can allow the user to store credentials for a simple web app in my up coming Android app. My fear (being new to Android) is that other (evil) apps

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 16:26

    I have a similar situation, and found the SimpleCrypto class enough for my needs to get the passwords encrypted to avoid plain text output of passwords being easily read.

    How you decide to use a key for the encryption is another question. As shown here, you could use the unique Id of the phone (obvious problems being that if they change phone you can't decrypt your data), or just simply use a random string in your code. It depends how hard you want to make recovery and how important the data is you're securing.

提交回复
热议问题