Refactor client crypto for better code readability.
Add encryption scheme, method and iv to symmetrically encrypted document MAC (#6400).
Fix bits from review.
Update debian package building script.