Encryption/Compression problem using a RDBMS

Alex Martelli aleaxit at yahoo.com
Mon May 21 11:57:36 EDT 2001


"Thomas Weholt" <thomas at cintra.no> wrote in message
news:HfaO6.1777$556.149792 at juliett.dax.net...
> Hi,
>
> I want to store encrypted and/or compressed XML in a text-field in a
RDBMS,
> currently PostgreSQL. But it crashes in inserts due to the fact that the
> process of compressing or encrypting gives a lot of "unprintable"
characters
> in the result data to be stored.
>
> Does anybody know any way of doing this? Can a algoritm return data that's
> friendly in the sense that it doesn't contain special characters that may
> cause trouble?

Several functions in standard module binascii lets you
get "friendly" encodings for arbitrary binary data (and,
of course, they also let you get the binary data back
again later:-).


Alex






More information about the Python-list mailing list