# parameter version to use when encrypting; note that this has no effect
# on decryption since the required settings are determined from the headers
+ crypto_version = DELTATAR_HEADER_VERSION
crypto_paramversion = None
# when encrypting or decrypting, these hold crypto handlers; created before
def __init__(self, excluded_files=[], included_files=[],
filter_func=None, mode="", password=None,
crypto_key=None, nacl=None,
+ crypto_version=DELTATAR_HEADER_VERSION,
crypto_paramversion=DELTATAR_PARAMETER_VERSION,
logger=None, index_mode=None, index_name_func=None,
volume_name_func=None):
- password: used to encrypt and decrypt backups. Encryption will be
enabled automatically if a password is supplied.
+ - crypto_version: version of the format, determining the kind of PDT
+ object header.
+
- crypto_paramversion: optionally request encryption conforming to
a specific parameter version. Defaults to the standard PDT value
which as of 2017 is the only one available.
if password is not None:
self.password = password
+ if crypto_version is not None:
+ self.crypto_version = crypto_version
+
if crypto_paramversion is not None:
self.crypto_paramversion = crypto_paramversion
return crypto.Encrypt (password=password,
key=key,
nacl=nacl,
- version=DELTATAR_HEADER_VERSION,
+ version=self.crypto_version,
paramversion=self.crypto_paramversion)
if mode == CRYPTO_MODE_DECRYPT:
return crypto.Decrypt (password=password, key=key)