Pringley/edb — pull request #2 by Pringley (2014-04-30 05:47:08+00:00)
Title: Refactor client and server

- Make `edb.server` a Django app (providing `edb.server.models.EncryptedModel`).

- Use salts instead of fixed indices to seed the stream cipher. This
allows us to store non-sequential encrypted data and still decrypt.
Downside: database size inflation of x2.

- Encode encryptions as base64 rather than raw bytes. This will allow
easier passing via JSON later.

- Implement server functions on an abstract Django model,
EncryptedModel. We expose a new manager function:

model.objects.encrypted_filter(field1=query1, field2=query2)

Queries can be generated by the new client `query()` function.

- Use Django's unittest framework to run tests. This allows us to
create a temporary database to run our tests against.

- Add preliminary error handling to the client and server.