revise crypto context interface
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 9 Mar 2017 15:41:57 +0000 (16:41 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commit39accaaa0e6ad97910f34d305a13dd4a59d7a20d
tree56dd9804501bfa5f75e1249c81c347e909acaaf7
parente4e5d0b8fc92c69260d26f54b3d8cb14d02143dd
revise crypto context interface

Fold key handling and encryption into a common context “class”.
The context takes care of the counter, iv, keys etc. It has one
entry point (ctor) for each direction (read, write → decrypt,
encrypt) and provides hooks for transitioning to the next item.

Header and tag handling remain accessible independent of the
context since tarfile operates on the archive stream and file
objects.
deltatar/crypto.py