Added encryption functionality (Does not write encrypted file yet)