Not sure why in the world you would homebrew something like this- a small dependency isn't that bad, and aes can be pretty simple to use. Might as well go for the industrial strength approach.
Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list