Using function to determine effective encryption level (rather than if encryption is just initialised) to determine
if to proceed with executing encryption code

Included encryption and decryption in the code

Updated tdm.c to take into account increased size of data if encryption is to be used.

Much more work to be done.