yaptv/YapDatabase — pull request #64 by chrisballinger (2014-03-28 07:27:14+00:00)
Title: Add SQLCipher support

SQLCipher support has been added as a subspec, and it is very easy to setup. Following fmdb's example, just change your Podfile to:

pod 'YapDatabase/SQLCipher'

If you aren't using the SQLCipher subspec, your project won't even compile the encryption configuration options to prevent the case of accidentally trying to use encryption when support is not available.

```obj-c
YapDatabaseOptions *options = [[YapDatabaseOptions alloc] init];
options.corruptAction = YapDatabaseCorruptAction_Fail;
options.passphraseBlock = ^{
// You can also do things like fetch from the keychain in here
return @"super secure passphrase";
};

self.database = [[YapDatabase alloc] initWithPath:databasePath
objectSerializer:NULL
objectDeserializer:NULL
metadataSerializer:NULL
metadataDeserializer:NULL
objectSanitizer:NULL
metadataSanitizer:NULL
options:options];
```

I implemented the passphrase as a block to help prevent storing the credentials in memory any longer than necessary. This block will be executed on database setup, and when new connections are made to the database.

This pull request resolves issue #4.