code: def sha256_fingerprint_from_raw_ssh_pub_key(raw_key):
      
      digest = hashlib.sha256(raw_key).digest()
      h = base64.b64encode(digest).decode('utf-8')
      h = h.rstrip().rstrip('=')  # drop newline and possible base64 padding
      return 'SHA256:' + h
docs: Encode a raw SSH key (string of bytes, as from
      `str(paramiko.AgentKey)`) to a fingerprint in the SHA256 form:
          SHA256:j2WoSeOWhFy69BQ39fuafFAySp9qCZTSCEyT2vRKcL+s