MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / get_uid

Method get_uid

pgpy/pgp.py:1838–1848  ·  view source on GitHub ↗

Find and return a User ID that matches the search string given. :param search: A text string to match name, comment, or email address against :type search: ``str``, ``unicode`` :return: The first matching :py:obj:`~pgpy.PGPUID`, or ``None`` if no matches were found.

(self, search)

Source from the content-addressed store, hash-verified

1836 self |= uid
1837
1838 def get_uid(self, search):
1839 """
1840 Find and return a User ID that matches the search string given.
1841
1842 :param search: A text string to match name, comment, or email address against
1843 :type search: ``str``, ``unicode``
1844 :return: The first matching :py:obj:`~pgpy.PGPUID`, or ``None`` if no matches were found.
1845 """
1846 if self.is_primary:
1847 return next((u for u in self._uids if search in filter(lambda a: a is not None, (u.name, u.comment, u.email))), None)
1848 return self.parent.get_uid(search)
1849
1850 def del_uid(self, search):
1851 """

Callers 6

del_uidMethod · 0.95
_get_key_flagsMethod · 0.95
_signMethod · 0.95
encryptMethod · 0.95
test_revoke_altuidMethod · 0.80
test_remove_altuidMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_revoke_altuidMethod · 0.64
test_remove_altuidMethod · 0.64