[Github-comments] [geany/geany] bug with python3 and hashlib.pbkdf2_hmac (#2563)

rquantguy notifications at xxxxx
Thu Jul 30 02:31:25 UTC 2020


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


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2563
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200729/aea1bfc9/attachment-0001.htm>


More information about the Github-comments mailing list