Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`_sslverify`.`PublicKey``

class documentation

`class PublicKey: (source)`

Known subclasses: `twisted.internet.ssl.KeyPair`

View In Hierarchy

A `PublicKey` is a representation of the public part of a key pair.

You can't do a whole lot with it aside from comparing it to other `PublicKey` objects.

Note
If constructing a `PublicKey` manually, be sure to pass only a `OpenSSL.crypto.PKey` that does not contain a private key!

Method | `__init__` | No summary
Method | `__repr__` | Undocumented
Method | `inspect` | Undocumented
Method | `keyHash` | Compute a hash of the underlying PKey object.
Method | `matches` | Does this `PublicKey` contain the same value as another `PublicKey`?
Instance Variable | `original` | The original private key.

def __init__(self, osslpkey): (source)

Parameters
osslpkey:`OpenSSL.crypto.PKey` | The underlying pyOpenSSL key object.

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def inspect(self): (source)
overridden in `twisted.internet.ssl.KeyPair`

Undocumented

def keyHash(self): (source)

Compute a hash of the underlying PKey object.

The purpose of this method is to allow you to determine if two certificates share the same public key; it is not really useful for anything else.

In versions of Twisted prior to 15.0, `keyHash` used a technique involving certificate requests for computing the hash that was not stable in the face of changes to the underlying OpenSSL library.

Returns
native `str` | Return a 32-character hexadecimal string uniquely identifying this public key, for this version of Twisted.

def matches(self, otherKey): (source)

Does this `PublicKey` contain the same value as another `PublicKey`?

Parameters
otherKey:`PublicKey` | The key to compare `self` to.
Returns
`bool` | `True` if these keys match, `False` if not.

original = (source)

The original private key.