예제 #1
0
class TestPGPKeyring(object):
    kr = PGPKeyring(_read('tests/testdata/pubtest.asc'))

    def test_key_keyerror(self):
        with pytest.raises(KeyError):
            with self.kr.key('DEADBEA7CAFED00D'):
                pass
예제 #2
0
    def __init__(self, homedir=None, gpgpath="gpg"):
        """Init PGPyCrypto class.

        :param homedir: home dir
        :type key: str
        :param gpgpath: kept for compatibility with BinGPG API
        :type gpgpath: str

        """
        # NOTE: called as .._pgpy.. to know that is instance of PGPKey
        self.pgpydir = homedir
        self.memkr = PGPKeyring()
        self._ensure_init()
예제 #3
0
def keyring():
    return PGPKeyring()