ojarva / python-sshpubkeys

OpenSSH public key parser for Python
BSD 3-Clause "New" or "Revised" License
100 stars 41 forks source link

Hash failure on python3 #59

Closed rmspeers closed 2 years ago

rmspeers commented 5 years ago

It appears that in py3 there may be an issue with the hash computation. I have not diagnosed fully. This happens when I call ssh.hash_sha256().

...
    'hash': ssh.hash_sha256(),
  File "/usr/local/lib/python3.5/dist-packages/sshpubkeys-3.1.0-py3.5.egg/sshpubkeys/keys.py", line 162, in hash_sha256
    fp_plain = hashlib.sha256(self._decoded_key).digest()
TypeError: object supporting the buffer API required
ojarva commented 2 years ago

This is not reflected in tests and I don't have test data which would reproduce this. If you have more information on this, feel free to reopen this (with extra information added) or create a PR fixing the issue.