开发者

File encryption/decryption on Android SD card

开发者 https://www.devze.com 2023-04-11 23:42 出处:网络
I want to encrypt/decrypt a file on sd card so that no one can access that file on android. Is there any possibility to开发者_如何学运维 do that? Any code? You can easily encrypt file on Android, but

I want to encrypt/decrypt a file on sd card so that no one can access that file on android. Is there any possibility to开发者_如何学运维 do that? Any code?


You can easily encrypt file on Android, but you need a key to encrypt data.

Where will you store that key? Inside apk? Capable engineers will be able to reverse-engineer your apk and extract the key.

The only secure option is to require user to enter password, which you use to hash the key. This will prevent 3rd parties (= stolen phone) to get to the file, but it will not prevent owners of the phone access to the file (i.e. DRM not possible).

0

精彩评论

暂无评论...
验证码 换一张
取 消