# Path: duplicity/globals.py



import os, types, tempfile, re, gzip
from duplicity import misc
from duplicity import globals
from duplicity import GnuPGInterface
    from hashlib import sha1
    from hashlib import md5
    from sha import new as sha1
    from md5 import new as md5
    from duplicity import path
            self.recipients = []


class GPGFile:
    """
    File-like object that encrypts decrypts another file on the fly
    """
    def __init__(self, encrypt, encrypt_path, profile):
        """
        GPGFile initializer

        If recipients is set, use public key encryption and encrypt to
        the given keys.  Otherwise, use symmetric encryption.

        encrypt_path is the Path of the gpg encrypted file.  Right now
        only symmetric encryption/decryption is supported.

        If passphrase is false, do not set passphrase - GPG program
        should prompt for it.
        """
        self.status_fp = None # used to find signature
        self.closed = None # set to true after file closed
        self.logger_fp = tempfile.TemporaryFile()
        self.stderr_fp = tempfile.TemporaryFile()
        self.name = encrypt_path

        # Start GPG process - copied from GnuPGInterface docstring.
        gnupg = GnuPGInterface.GnuPG()
        gnupg.options.meta_interactive = 0
        gnupg.options.extra_args.append('--no-secmem-warning')

# Path: duplicity/globals.py



# Path: duplicity/gpg.py
import os, types, tempfile, re, gzip
from duplicity import misc
from duplicity import globals
from duplicity import GnuPGInterface
    from hashlib import sha1
    from hashlib import md5
    from sha import new as sha1
    from md5 import new as md5
    from duplicity import path

            self.recipients = []


class GPGFile:
    """
    File-like object that encrypts decrypts another file on the fly
    """
    def __init__(self, encrypt, encrypt_path, profile):
        """
        GPGFile initializer

        If recipients is set, use public key encryption and encrypt to
        the given keys.  Otherwise, use symmetric encryption.

        encrypt_path is the Path of the gpg encrypted file.  Right now
        only symmetric encryption/decryption is supported.

        If passphrase is false, do not set passphrase - GPG program
        should prompt for it.
        """
        self.status_fp = None # used to find signature
        self.closed = None # set to true after file closed
        self.logger_fp = tempfile.TemporaryFile()
        self.stderr_fp = tempfile.TemporaryFile()
        self.name = encrypt_path

        # Start GPG process - copied from GnuPGInterface docstring.
        gnupg = GnuPGInterface.GnuPG()
        gnupg.options.meta_interactive = 0
        gnupg.options.extra_args.append('--no-secmem-warning')

        if globals.use_agent: