Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paramiko.ed25519key
#4
A sha256 hex is 64 characters long.
What you have looks like base64 encoded text. So, let's go fishing...
>>> import base64
>>> keydata = b"""RLhdtbhVbFXUeqZh6jm0t5ToI6b4IGbac8R2EkP+Ido="""
>>> decoded = base64.b64decode(keydata)
>>> decoded
b'D\xb8]\xb5\xb8UlU\xd4z\xa6a\xea9\xb4\xb7\x94\xe8#\xa6\xf8 f\xdas\xc4v\x12C\xfe!\xda'
>>> hexhash = decoded.hex()
>>> hexhash
'44b85db5b8556c55d47aa661ea39b4b794e823a6f82066da73c4761243fe21da'
>>> len(hexhash)
64
So maybe if you use the bytes.hex() method (as shown), paramiko can understand what you're passing? ie, try this: key = paramiko.ed25519key.Ed25519Key(data=decodebytes(keydata).hex())
Reply


Messages In This Thread
paramiko.ed25519key - by cverm - Nov-30-2018, 08:31 PM
RE: paramiko.ed25519key - by nilamo - Nov-30-2018, 09:25 PM
RE: paramiko.ed25519key - by cverm - Dec-03-2018, 01:18 PM
RE: paramiko.ed25519key - by nilamo - Dec-03-2018, 05:11 PM
RE: paramiko.ed25519key - by cverm - Dec-06-2018, 01:04 PM
RE: paramiko.ed25519key - by nilamo - Dec-06-2018, 03:45 PM
RE: paramiko.ed25519key - by cverm - Dec-06-2018, 08:26 PM
RE: paramiko.ed25519key - by nilamo - Dec-06-2018, 08:39 PM
RE: paramiko.ed25519key - by cverm - Dec-07-2018, 11:47 AM
RE: paramiko.ed25519key - by nilamo - Dec-07-2018, 03:59 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020