Improve functions for encrypting/decrypting archives