In computer terminologycomputing, '''polymorphic code''' is code that uses a [[polymorphic engine]] to mutate while keeping the original [[algorithm]] intact. That is, the code changes itself each time it runs, but the function of the code (its [[semantics]]) will not change at all. For example, 1+3 and 6-2 both achieve the same result while using different values and operations. This technique is sometimes used by [[computer virus]]es, [[shellcode]]s and [[computer worm]]s to hide their presence.<ref name="rugha">Raghunathan, Srinivasan (2007). ''Protecting anti-virus software under viral attacks''. M.Sc. Thesis, Arizona State University.[https://pdfs.semanticscholar.org/0676/da6041ea51a3e8d80c597e503680e925aed0.pdf]{{Dead link|date=May 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
[[Encryption]] is the most common method to hide code. With encryption, the main body of the code (also called its payload) is encrypted and will appear meaningless. For the code to function as before, a decryption function is added to the code. When the code is ''executed'' this function reads the payload and decrypts it before executing it in turn.