Encrypts or decrypts a textfile