Hi! Today I suddenly needed the tiger hashsums from python - it's not included in the standard distribution and I couldn't find it somewhere. So I thought that's it's maybe time again to contribute :-) It was a quite straight forward task to write a wrapper that is able to calculate such hash-sums from Python, besides the tiger.c/tiger.h it's only a few lines of code. It runs perfect under Linux with distutils - I guess someone who knows windows better has to look for a windows port beacuse of the 'long long' integers (shouldn't be too hard) ... But at least for me it's really useful:
import tiger tiger.tiger("Python is cool... And now it can even calculate tiger hashsums!") (135509944, 135510340, 135510352, 135509920, 135510016, 135197188) tiger.__doc__ 'This module gives you access to the fast, cryptographic tiger hash function from Eli Biham, see http://www.cs.technion.ac.il/~biham/Reports/Tiger/ for details.' tiger.tiger.__doc__ 'tiger(string) -> (int, int, int, int, int, int) -- compute a 192 bit hash-sum of given string (which can contain zero characters)'
Are you interested to get the code, maybe for the next release? Shall I send it to someone of you developers? Or upload somewhere to your project page? Or just send it here as attachment? Just let me know. Best regards! Tino
Tino> I guess someone who knows windows better has to look for a windows Tino> port beacuse of the 'long long' integers (shouldn't be too hard) Tino> ... The LONG_LONG macro is defined in Python's Include/pyport.h file. Just use it instead of 'long long'. On Windows I think 'long long' is spelled '__int64'. Skip
Skip, Ah, great! Thank you! I'll try that tomorrow with MSVC 6. Cheers, Tino ---------- Skip Montanaro wrote:
Tino> I guess someone who knows windows better has to look for a windows Tino> port beacuse of the 'long long' integers (shouldn't be too hard) Tino> ...
The LONG_LONG macro is defined in Python's Include/pyport.h file. Just use it instead of 'long long'. On Windows I think 'long long' is spelled '__int64'.
Skip
Tino Lange <Tino.Lange@isg.de> writes:
Are you interested to get the code, maybe for the next release? Shall I send it to someone of you developers? Or upload somewhere to your project page? Or just send it here as attachment?
Dear Tino, We are usually reluctant to add modules to the Python core distribution, until there is some user community interested in that module. Until then, I recommend you submit your module to the Vaults of Parnassus, and announce it to comp.lang.python.announce. Regards, Martin
participants (3)
-
martin@v.loewis.de
-
Skip Montanaro
-
Tino Lange