need encryption algorithm

Noah Spurrier noah at noah.org
Tue Apr 23 02:06:04 EDT 2002


Most crypto libraries output 8-bit binary. You are probably trying to store
that binary in a VARCHAR2 field in Oracle. Maybe it thinks its Unicode.

What you want to do is also use a binary to ASCII encoder.
Python includes a number of different modules to encode binary data
as plain ASCII text. Take a look at the base64 module:
    http://www.python.org/doc/current/lib/module-base64.html#l2h-3019
or for more detailed control try the binascii module:
    http://www.python.org/doc/current/lib/module-binascii.html
So just take the result of your rotor encryption and pass it through base64
then store that result in your database.

You could also look into what BLOB fields Oracle supports. I've never used
them.
I have always had painful experiences using BLOBs in databases.

The Enigma rotor encryption is really bad. I wish Python came with at least
one
half-way decent encryption algorithm like AES or DES.

Noah

----- Original Message -----
From: "Hugh" <h.e.w.frater at cs.cf.ac.uk>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Monday, April 22, 2002 6:41 PM
Subject: need encryption algorithm


> Hi all,
>   I need a simple encryption algorithm that will not give me
> characters that I can't store in my oracle table. At the moment I'm
> using the rotor encryption module because I like it's simple interface
> but It's generating characters that oracle can't store which is a damn
> pain. What other modules are available that are easy to use and will
> do what I wan't. Remember that security is not paramount here, I'm
> only including it for functionality.
>
> Thanks,
> hugh
>






More information about the Python-list mailing list