If I create a file makehash.py with the following lines, I can run it in the terminal and get a hex hash.
<pre> #!/usr/bin/python3 import hashlib myhash = hashlib.pbkdf2_hmac('sha256',password="sw0rdf!sh".encode(),salt="NaCl".encode(),iterations=100000).hex() print(myhash) </pre>
When I have the file up in geany and I press F5 or click the gear to run it from the IDE, I get this error:
<pre> Traceback (most recent call last): File "geany_hashlib_bug.py", line 4, in <module> myhash = hashlib.pbkdf2_hmac('sha256',password="sw0rdf!sh".encode(),salt="NaCl".encode(),iterations=100000).hex() AttributeError: 'str' object has no attribute 'hex' </pre>
------------------ (program exited with code: 1) Press return to continue