Flex移动数据安全
我四处搜寻,但还没有真正找到我要找的东西。我正在为移动设备开发一个灵活的应用程序。该应用程序会将客户数据从 api 同步到移动设备。但一旦在设备上,我计划将其保存在 sqlLite DB 中。我如何保护这些数据?我知道我可以对其进行哈希处理,但我猜想有人能够反编译该应用程序并获取哈希密钥。我是 Flex 和移动开发的新手,所以我可能错过了一个非常明显的答案。
提前致谢
JaCHNo
I had a search around but I have not really found what I am looking for. I am developing a flex application for mobile devices. This application will sync customer data down from an api to the mobile device. but once on the device I plan to hold it in sqlLite DB. How can I secure this data? I know that I could hash it but I guess that that someone would be able to decompile the application and get the hash key. I am new to flex and mobile development so there may be a really obvious answer that I have missed.
Thanks in advance
JaCHNo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不建议使用基于 AS3 的加密技术来加密数据库上的数据,因为它会很慢并且不可能使用数据,除非您解密所有内容并在查询之间重新加密(当然,除非您必须对其进行加密,例如对用户的密码进行哈希处理或其他操作,以便您可以进行单向比较)。加密数据库本身是最好的方法。
这是有关如何操作的教程。
I wouldn't recommend using AS3 based cryptography to encrypt data on the DB since it would be slow and impossible to use the data unless you decrypt everything and re-encrypt between queries (that is of course, unless you have to encrypt it like say hashing passwords of users or something so that you can do a one way compare). Encrypting the DB itself is the best way.
Here's a tutorial on how to do it.
您的问题并不是移动设备所独有的。
我相信您要么必须加密本地 SQLLite 数据库,要么加密其中存储的数据。
以下是关于 文档 a href="http://cookbooks.adobe.com/post_AIR_Encrypted_SQLite_Database-16250.html" rel="nofollow noreferrer">处理加密 SQLLite 数据库。
还有一些用于加密数据的库。 ASCrypt3 和 AS3Crypto 如果您想加密数据,而不是数据库。
您提到了哈希值,通常当人们谈论哈希值时,他们正在谈论单向加密,所以我我不确定在需要读取数据的数据存储中会有什么好处。
Nothing about your question is really unique to mobile devices.
I believe you either have to Encrypt the local SQLLite database or encrypt the data stored in it.
Here is some documentation on dealing with encrypted SQLLite databases.
There are also a few libraries for encrypting data. ASCrypt3 and AS3Crypto if you wanted to encrypt the data, but not the database.
You mentioned hashes, usually when people talk about hashes they are talking about one way encryption, so I'm not sure the benefit that would be in a data store where you need to read the data.
如果您只需要保护少数/几条数据(例如信用卡数据、电话号码,但不需要保护他们的订单历史记录等);我会使用 EncryptedLocalStore。这是一个使用简单的解决方案,并且已经在框架中,因此它经过了 Adobe 测试,您不会不必要地增加应用程序的大小。
据我所知,as3lib 有实际的加密实用程序;但它并不是为移动设备设计的。
旁注:
从技术上讲,散列并不是加密。 加密,根据定义,意味着一个秘密密钥,如果知道的话,可以用来轻松地(无论如何形式上很容易)恢复原始信息。散列“有点”像加密,但会立即删除密钥,因此,除非您知道原始信息是什么,否则您不知道原始输入必须做什么才能获得输出/散列。或者...向其中添加数据,然后将其全部打乱。
If you only need to protect a few/several pieces of data (e.g. credit card data, phone number, but not their order history or something); I would use the EncryptedLocalStore. It's a simple solution to use and it's already in the framework, so it's Adobe tested and you aren't adding to the size of the app unnecessarily.
From what I remember, the as3lib has actual encryption utilities; but it wasn't intended for mobile.
Side note:
Hashing technically isn't encrypting. Encrypting, by definition, implies a secret key that, if known, can be used to easily (formally easy anyway) recover the original information. Hashing is "kind of" like encrypting but immediately deleting the key so that, unless you know what the original information is, you have no idea what you'd have to for original input to get the output/hash. Or... adding data to it and then just scrambling it all up.