예제 #1
0
def _fingerprint(pubkey):
    stripped = _OpenSSH_Keyfile_Strip.sub(b'', exportkey.openSSH(pubkey.public_numbers()))
    decoded  = base64.b64decode(stripped)
    khash    = hashlib.md5(decoded).hexdigest()
    return ':'.join([khash[i:i+2] for i in range(0, len(khash), 2)])
예제 #2
0
def _pubkeyWireFormat(pubkey):
    pubk_numbers = pubkey.public_numbers()
    logger.debug('openssh format publickey:\n%s' % exportkey.openSSH(pubk_numbers))
    return quoteURL(_OpenSSH_Keyfile_Strip.sub(b'', exportkey.openSSH(pubk_numbers)))
예제 #3
0
def _pubkeyWireFormat(pubkey):
    pubk_numbers = pubkey.public_numbers()
    logger.debug('openssh format publickey:\n%s' %
                 exportkey.openSSH(pubk_numbers))
    return quoteURL(
        _OpenSSH_Keyfile_Strip.sub(b'', exportkey.openSSH(pubk_numbers)))
예제 #4
0
def _fingerprint(pubkey):
    stripped = _OpenSSH_Keyfile_Strip.sub(
        b'', exportkey.openSSH(pubkey.public_numbers()))
    decoded = base64.b64decode(stripped)
    khash = hashlib.md5(decoded).hexdigest()
    return ':'.join([khash[i:i + 2] for i in range(0, len(khash), 2)])
예제 #5
0
def _pubkeyWireFormat(pubkey):
    return quoteURL(_OpenSSH_Keyfile_Strip.sub(b'', exportkey.openSSH(pubkey)))