给sqlite数据库加密的两种方法

本文介绍了两种在Cocoa/Cocoa Touch应用中为SQLite数据库加密的方法。第一种是利用SQLCipher,它是一个开源的SQLite扩展,提供透明的数据加密。另一种方法是基于Philip J. Erdelsky的AES公共领域实现,创建Objective-C类别来加密和解密文件及内存中的数据。请注意,如果在iPhone应用中使用加密,可能需要提交CCATS表格以通过App Store审查。
摘要由CSDN通过智能技术生成

一个是采用SQLCipher

Need to store sensitive information in your app? SQLCipher  extends SQLite enabling transparent encryption and decryption of data using AES. Its source  is available on Github.

SQLite is pluggable. Developers can create extensions and chain them into SQLite’s engine. Using this mechanism, SQLCipher embeds itself low enough in the stack to be transparent. As a developer, you simply issue queries as you normally would and all of the crypto is handled transparently.

 

SQLCipher’s author, Stephen Lombardo of Zetetic , has also released Cryptographically Secure File I/O  a library that supports random access file IO on encrypted files.

 

另外一个

Strong Encryption for Cocoa  / Cocoa  Touch

AES  is a strong encryption standard that has mostly replaced the aging DES standard. AES is widely used and fairly secure encryption mechanism (but I am not an expert at cryptography by any stretch of the imagination; I’m trusting experts for that opinion). AES supports three different key sizes, 128, 192, and 256 (the larger the key, the more secure the encryption and the more processing power it takes to encrypt  or decrypt). Apple uses AES-128 and AES-256 in several places in Mac OS X, including for Disk Image encryption. 

 

There are several public-domain implementations of AES. I chose a public domain implementation

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值