revise crypto context interface
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 9 Mar 2017 15:41:57 +0000 (16:41 +0100)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 9 Mar 2017 15:42:31 +0000 (16:42 +0100)
commit431ac0ed3ca3bbe53f60c5bd6d42f6064539afdd
treefc010c662ecd1573e8b232766dfb8375737f8b9f
parent4d44fbde1ae7f0e5e5bfcface71586cd979776a2
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