Added code for file encryption and corresponding tests.