V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yx30
V2EX  ›  Android

Android 本地数据加密

  •  
  •   yx30 · 2015-10-28 13:09:13 +08:00 · 7011 次点击
    这是一个创建于 3096 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如数据库的数据和 SharePreference 的要怎么加密才不会轻易被破解查看
    10 条回复    2015-10-29 14:02:37 +08:00
    sangmingming
        1
    sangmingming  
       2015-10-28 13:27:21 +08:00   ❤️ 1
    使用 des 或者 aes 加密后再存储。
    数据库字段名称混淆,增加阅读难度。

    或者使用第三方的数据库加密工具。
    leeyuzhe
        2
    leeyuzhe  
       2015-10-28 13:38:05 +08:00
    5.0 还是 5.1 不是默认就数据加密了?
    yx30
        3
    yx30  
    OP
       2015-10-28 13:51:36 +08:00
    @leeyuzhe 还是要兼容低版本
    honeycomb
        4
    honeycomb  
       2015-10-28 14:20:00 +08:00
    @leeyuzhe
    这个加密等同与 iOS 的用户数据加密,用户一旦打开锁屏,便会解密
    这从 6.0 开始才是强制性的要求(见 CDD)

    LZ 问的是对于某一个具体应用开发的时候,如何保护配置文件
    leeyuzhe
        5
    leeyuzhe  
       2015-10-28 14:23:49 +08:00
    @honeycomb 对的,是我没理解楼主意思。 6.0 解锁后也解密了吧
    onlyxuyang
        6
    onlyxuyang  
       2015-10-28 15:03:27 +08:00 via Android   ❤️ 1
    ……麻烦 开 data 区全盘加密吧少年
    greenskinmonster
        7
    greenskinmonster  
       2015-10-28 15:29:04 +08:00   ❤️ 1
    https://github.com/facebook/conceal

    Conceal provides a set of easy to use APIs for performing fast encryption and authentication of data. Apps can use Conceal to encrypt data and large files stored in public locations, for example SD cards.

    Facebook 的一个开源项目
    silverzhao
        8
    silverzhao  
       2015-10-28 15:53:43 +08:00   ❤️ 1
    SQLCipher ,貌似微信的本地数据加密就是用的它:

    https://www.zetetic.net/sqlcipher/
    yx30
        9
    yx30  
    OP
       2015-10-29 13:48:44 +08:00
    @greenskinmonster
    不会要用 Buck 构建吧....
    greenskinmonster
        10
    greenskinmonster  
       2015-10-29 14:02:37 +08:00   ❤️ 1
    @yx30 有编译好的吧,不过个头不小。
    看 GitHub 项目页面
    Use prebuilt binaries: http://facebook.github.io/conceal/documentation/.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2835 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:33 · PVG 19:33 · LAX 04:33 · JFK 07:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.