[pycrypto] pycrypto issue
Dwayne C. Litzenberger
dlitz at dlitz.net
Sun Mar 28 15:44:20 CST 2010
Please post on the mailing list so that others who have similar problems
can find the answers by searching the archives.
On Sat, Mar 27, 2010 at 09:18:05PM -0700, h nguyen wrote:
>For the file SHA256.py , I copied from SHA and use sha256 function like
>this
>try:
> # The md5 module is deprecated in Python 2.6, so use hashlib when possible.
> import hashlib
> def new(data=""):
> return hashlib.sha256(data)
> digest_size = new().digest_size
>
>except ImportError:
> from sha256 import *
> import sha256
There is no need to do that.
>ImportError: cannot import name _counter
>
>I looked in folder Crypto.Util there's no _counter module...
PyCrypto is partly written in C (in the src/ directory) and partly written
in Python. You are using the Python parts and ignoring the C parts, which
is why it's not working. As I mentioned before, the parts in C will need
to be compiled into machine code before they can be used. You'll either
need to build it, or you can get Michael Foord's pre-built binaries for
Windows from his website:
http://www.voidspace.org.uk/python/modules.shtml#pycrypto
>Do you know that paramiko works on Windows XP?
Yes, I have used paramiko on Windows XP before.
--
Dwayne C. Litzenberger <dlitz at dlitz.net>
OpenPGP: 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 221 bytes
Desc: Digital signature
Url : http://lists.dlitz.net/pipermail/pycrypto/attachments/20100328/c14f1b2e/attachment.pgp
More information about the pycrypto
mailing list