add SCRYPT hashing mode to crypto.py
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 11 May 2017 08:35:40 +0000 (10:35 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commitda82bc589cb763e63f60097114589915f48d6f8e
treeeae3de1917047346eeeab8c72dac216f7db3ccbf
parentcb7a3911f8cb46de4ac386a9fa7c4f4978e95042
add SCRYPT hashing mode to crypto.py

Add a subcommand “scrypt” to crypto.py in CLI mode. Example:

    $ python3 ./deltatar/crypto.py scrypt foo -i - -o pwd   \
        <backup_dir/bfull-2017-05-11-0919-001.tar.pdtcrypt
    {"scrypt_params": {"p": 1, "N": 65536, "dkLen": 16, "r": 8},
     "salt": "b'fbdbaa9890ae243eb16391199c9243f6'", "hash":
     "b'1e7d7a78b9300d461779e9c80e4a15ac'"}

The output “hash” is calculated from the salt in the first
header found in the given archive and the password specified.
deltatar/crypto.py