A more advanced method is the use of simple encryption to encipher the virus.
From the en.wikipedia.org
That keystream is then XORed against the message you want to encipher.
From the en.wikipedia.org
To encipher a letter, the operator pushed the relevant key and noted down which of the lamps lit.
From the en.wikipedia.org
The solution is to have an encrypting key that is different from the decrypting key-one key to encipher a message, and another, different key to decipher it.
From the theatlantic.com
Suppose that the specified indicator setting was RAO, and the chosen 3-letter message key was IHL, the operator would set the rotors to RAO and encipher IHL twice.
From the en.wikipedia.org
More examples
Code: convert ordinary language into code; "We should encode the message for security reasons"
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption -- a series of well-defined steps that can be followed as a procedure. An alternative, less common term is encipherment. ...
To convert plain text into cipher; to encrypt
(Enciphering) The conversion of plain text or data into unintelligible form by means of a reversible translation that is based on a translation table or algorithm.
The process which will transform information or plaintext into one of plethora of intermediate forms or ciphertext, as selected by a key. The inverse of decipher.