Пример #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)))