'Creates a fingerprint that can be compared with a private key to see if
the two form a pair.
This fingerprint is not compatiable with fingerprints generated by any
other software.
:return:
A byte string that is a sha256 hash of selected components (based
on the key type)'

@property
def fingerprint(self):

    if (self._fingerprint is None):
        key_type = self[u'algorithm'][u'algorithm'].native
        params = self[u'algorithm'][u'parameters']
        if (key_type == u'rsa'):
            key = self[u'public_key'].parsed
            to_hash = (u'%d:%d' % (key[u'modulus'].native, key[u'public_exponent'].native))
        elif (key_type == u'dsa'):
            key = self[u'public_key'].parsed
            to_hash = (u'%d:%d:%d:%d' % (params[u'p'].native, params[u'q'].native, params[u'g'].native, key.native))
        elif (key_type == u'ec'):
            key = self[u'public_key']
            if (params.name == u'named'):
                to_hash = (u'%s:' % params.chosen.native)
                to_hash = to_hash.encode(u'utf-8')
                to_hash += key.native
            elif (params.name == u'implicit_ca'):
                to_hash = key.native
            elif (params.name == u'specified'):
                to_hash = (u'%s:' % params.chosen[u'field_id'][u'parameters'].native)
                to_hash = to_hash.encode(u'utf-8')
                to_hash += (':' + params.chosen[u'curve'][u'a'].native)
                to_hash += (':' + params.chosen[u'curve'][u'b'].native)
                to_hash += key.native
        if isinstance(to_hash, str_cls):
            to_hash = to_hash.encode(u'utf-8')
        self._fingerprint = hashlib.sha256(to_hash).digest()
    return self._fingerprint
