store encrypted data in sqlite ?

Jonathan Gardner jgardner at
Fri Oct 2 22:37:45 CEST 2009

On Oct 2, 11:53 am, Stef Mientki <stef.mien... at> wrote:
> Will this method work always ?
> Are there better methods ?

I SQLite doesn't like raw data (with all its \0 glory), you're out of
luck, unfortunately. Base64 encoding is a really good solution for
places like this.

You are aware, of course, of the dangers of storing sensitive data in
memory? That is, if you are storing the sensitive data anywhere in a
Python variable, it is possible for someone with access to the memory
of the machine to discover it.

If it is only the storage of the sensitive data you are concerned
about, or the sensitivity of the data if it is transferred over the
network, there are other, easier ways to protect the data than in an
encrypted field.

More information about the Python-list mailing list