在iPhone操作系统中加密SQLite数据库文件 [英] Encrypting SQLite Database file in iPhone OS

查看:110
本文介绍了在iPhone操作系统中加密SQLite数据库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhone上的任何SQLite数据库只是与应用程序捆绑在一起的文件。任何人提取此文件并进行查询相对简单。

Any SQLite database on the iPhone is simply a file bundled with the application. It is relatively simple for anyone to extract this file and query it.

您对数据库中存储的文件或数据进行加密有什么建议。

What are your suggestions for encrypting either the file or the data stored within the database.

编辑:应用程序是一种可以对其他用户播放的游戏。有关用户相关优势和弱点的信息将存储在数据库中。我不希望用户能够将手机的声誉/功率等待起来,然后赢得比赛/联赛等(注意:试图模糊,因为想法在NDA之下)。

The App is a game that will be played against other users. Information about a users relative strengths and weaknesses will be stored in the DB. I don't want a user to be able to jail-break the phone up their reputation/power etc then win the tournament/league etc (NB: Trying to be vague as the idea is under NDA).

我不需要军事加密,我只是不想用纯文本存储东西。

I don't need military encryption, I just don't want to store things in plain text.

编辑2 :更多的澄清,我的主要目标是

Edit 2: A little more clarification, my main goals are


  1. 使敏感数据变得非常简单

  2. 有一个简单的方法来发现数据是否被更改(某种校验和)


推荐答案

你不能信任客户,期间。如果您的独立应用程序可以解密,那么它们也是如此。将数据放在服务器上或不要打扰,因为实际上打破数据以增强统计数据的人数将是微不足道的,所以应该可以获得奖励。

You cannot trust the client, period. If your standalone app can decrypt it, so will they. Either put the data on a server or don't bother, as the number of people who actually crack it to enhance stats will be minuscule, and they should probably be rewarded for the effort anyway!

将一个字符串放在数据库中,说请不要欺骗。

Put a string in the database saying "please don't cheat".

这篇关于在iPhone操作系统中加密SQLite数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆