Package duplicity :: Module gpg :: Class GPGFile
[hide private]
[frames] | no frames]

Class GPGFile

source code

File-like object that encrypts decrypts another file on the fly

Instance Methods [hide private]
 
__init__(self, encrypt, encrypt_path, profile)
GPGFile initializer
source code
 
read(self, length=-1) source code
 
write(self, buf) source code
 
tell(self) source code
 
seek(self, offset) source code
 
gpg_failed(self) source code
 
close(self) source code
 
set_signature(self)
Set self.signature to 8 character signature keyID
source code
 
get_signature(self)
Return 8 character keyID of signature, or None if none
source code
Method Details [hide private]

__init__(self, encrypt, encrypt_path, profile)
(Constructor)

source code 

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.

set_signature(self)

source code 

Set self.signature to 8 character signature keyID

This only applies to decrypted files. If the file was not signed, set self.signature to None.