Finished functions that read and write to encrypted files