Ejemplo n.º 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)])
Ejemplo n.º 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)))
Ejemplo n.º 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)))
Ejemplo n.º 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)])
Ejemplo n.º 5
0
def _pubkeyWireFormat(pubkey):
    return quoteURL(_OpenSSH_Keyfile_Strip.sub(b'', exportkey.openSSH(pubkey)))