fork(412) download
  1. # Code from <http://stackoverflow.com/a/6682934/1535629>
  2. import base64, hashlib
  3.  
  4. # paste your key on line 6
  5. key = """
  6. ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqmEmDTNBC6O8HGCdu0MZ9zLCivDsYSttrrmlq87/YsEBpvwUTiF3UEQuFLaq5Gm+dtgxJewg/UwsZrDFxzpQhCHB6VmqrbKN2hEIkk/HJvCnAmR1ehXv8n2BWw3Jlw7Z+VgWwXAH50f2HWYqTaE4qP4Dxc4RlElxgNmlDPGXw/dYBvChYBG/RvIiTz1L+pYzPD4JR54IMmTOwjcGIJl7nk1VjKvl3D8Wgp6qejv4MfZ7Htdc99SUKcKWAeHYsjPXosSk3GlwKiS/sZi51Yca394GE7T4hZu6HTaXeZoD8+IZ7AijYn89H7EPjuu0iCAa/cjVzBsFHGszQYG+U5KfIw==
  7.  
  8. """
  9.  
  10. def lineToFingerprint(line):
  11. key = base64.b64decode(line.strip().split()[1].encode('ascii'))
  12. fp_plain = hashlib.md5(key).hexdigest()
  13. return ':'.join(a+b for a,b in zip(fp_plain[::2], fp_plain[1::2]))
  14.  
  15. print(lineToFingerprint(key))
Success #stdin #stdout 0.11s 12248KB
stdin
Standard input is empty
stdout
49:d3:cb:f6:00:d2:93:43:a6:27:07:ca:12:fd:5d:98