Removed unneeded functions and added selection for digest and compression to encrypt and sign