Home/Support/Support Forum/MD5 calculations
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

MD5 calculations

0 votes
I'm considering the Connect WAN 3G for some applications using a proprietary MD5 signature. I'm attempting to calculate an MD5 digest, but running into problems. I'm really new to Python. I have a short file uploaded to the Digi to test MD5.

# DigiMD5test.py

import hashlib
m = hashlib.new()
print m.hexdigest()

I have also uploaded md5.py and hashlib.py to the Digi. I'm seeing the following error:

#> python DigiMD5test.py

Traceback (most recent call last):
File "<string>", line 3, in ?
File "WEB/python/hashlib.py", line 133, in ?
md5 = __get_builtin_constructor('md5')
File "WEB/python/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5


Any ideas? I could use many of these devices if I could compute MD5s with Python.
asked Jun 20, 2008 in Python by royce New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
First, it sounds as if you are using Python 2.5. hashlib.py and md5.py were introduced in 2.5. Our system is currently running the 2.4.3 version of the interpreter. For best results, module libraries from 2.4 should be used, or language features that don't exist in our system may be used and cause hard to debug errors.

There is MD5 support as a built-in module in the Python interpreter in 2.4 as the 'md5' module which was implemented as purely a built-in. However, at this time our system is not built with that part of the main interpreter. We are going through a release cycle at this time that has them enabled, but I don't have an updated schedule on when those can be expected to be released. It will be in the 82001532_D revision of the Connect WAN 3G firmware.
answered Jun 20, 2008 by DigiGuy42 Community Contributor (102 points)
0 votes
An additional clarification. We have enabled the deprecated built-in md5 module to our interpreter, not upgraded to 2.5. There is no scheduled upgrade planned, but a move to 2.6 is being considered when that is released and stable.
answered Jun 20, 2008 by DigiGuy42 Community Contributor (102 points)