• Possible Bug

 

I would like to give some feedback about ...

From: https://checkio.org/mission/simple_hashlib/solve/

HTTP_USER_AGENT:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

I think there's possibly a bug here. Here's the output: TypeError: <class '_hashlib.HASH' at 0x7fe913278440> is wrong data type Fail: checkio(u"welcome","md5")

Here is the code working on my local computer on python3.4.3:

eval('hashlib.' + algorithm)(bytes(hashed_string, 'utf-8')) <md5 HASH object @ 0x109225f30>

And successful on 2.7.10: In [5]: eval('hashlib.' + algorithm)(bytes(hashed_string)) Out[5]: <md5 HASH object @ 0x1035ddb30>