summaryrefslogtreecommitdiff
path: root/memoryhole/openpgp.py
blob: ac5cb6ea6e12fd974b2d88bdf1ec1172235f6bef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from zope.interface import Interface


class OpenPGP(Interface):
    def encrypt(data, encraddr, singaddr):
        """
        Encrypt and sign data.

        :param data: data to be encrypted
        :type data: str
        :param encraddr: list of email addresses to encrypt to
        :type encraddr: [str]
        :param singaddr: email address to sign with
        :type singaddr: str

        :return: encrypted and signed data
        :rtype: str
        """
        pass

    def decrypt(data):
        """
        Decrypt and verify data.

        :param data: data to be decrypted
        :type data: str

        :return: decrypted data
        :rtype: str
        """
        # What about verification???
        pass

    def verify(data, signature):
        """
        Verify a signature.

        :param data: data to be virified
        :type data: str
        :param signature: detached signature
        :type signature: str

        :return: is signature valid
        :rtype: bool
        """
        pass