コード例 #1
0
def public_key_fingerprint(key):

    paramiko_key = ParamikoRSAKey(vals=(key.e, key.n))
    fp = hexlify(paramiko_key.get_fingerprint())

    openssh_fp = ":".join([a+b for a, b in zip(fp[::2], fp[1::2])])

    return openssh_fp
コード例 #2
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
def public_key_fingerprint(key):
    # paramiko can compute the OpenSSH-style fingerprint
    # Only fingerprints the public key

    paramiko_key = ParamikoRSAKey(vals=(key.e, key.n))
    fp = hexlify(paramiko_key.get_fingerprint())

    # OpenSSH puts a ":" character between every pair of hex-digits.
    # For whatever reason. Readability, I guess.
    openssh_fp = ":".join([a + b for a, b in zip(fp[::2], fp[1::2])])

    return openssh_fp
コード例 #3
0
def public_key_fingerprint(key):
    # paramiko can compute the OpenSSH-style fingerprint
    # Only fingerprints the public key

    paramiko_key = ParamikoRSAKey(vals=(key.e, key.n))
    fp = hexlify(paramiko_key.get_fingerprint())

    # OpenSSH puts a ":" character between every pair of hex-digits.
    # For whatever reason. Readability, I guess.
    openssh_fp = ":".join([a + b for a, b in zip(fp[::2], fp[1::2])])

    return openssh_fp
コード例 #4
0
ファイル: utils.py プロジェクト: maurycyp/namecoiny
def get_fingerprint_for_rsa_key_path(path):
    key = RSAKey(filename=path)
    fp = key.get_fingerprint().encode('hex')
    return add_colons_to_fingerprint(fp)