call of non-function (type string) error

Graham Guttocks graham_guttocks at yahoo.co.nz
Wed Apr 11 16:05:55 EDT 2001


Kalle Svensson <kalle at gnupung.net> wrote:

> Perhaps try
> >>> cipherobj = cipher.new(KEY, cipher.CBC, IV)

That did it, thanks mate!

For the record, here is the whole working sequence:  
(Whew, what a mess):

---------------------------------------------------
CIPHER = "DES3"
exec "from Crypto.Cipher import %s" % CIPHER

Crypto = __import__("Crypto.Cipher.%s" % CIPHER)
cipher = getattr(Crypto.Cipher, CIPHER)
cipherobj = cipher.new(KEY, cipher.CBC, IV)
---------------------------------------------------

Cheers,
Graham

_____________________________________________________________________________
http://movies.yahoo.com.au - Yahoo! Movies
- Now showing: Dude Where's My Car, The Wedding Planner, Traffic..




More information about the Python-list mailing list