My problem is as follows: I would like to obfuscate LaTeX code in a style file, so that others may be able to use some LaTeX commands I define, but are not able to see how they are defined. This issue has been raised already on stackexchange (for example Obfuscating TeX) but no real answer has been given. The example of the xii.tex file is very impressive and exactly what I need, but no information is given on the way this document has been obtained.
Does anyone know how I can convert code into something like xii.tex in an irreversible way?
\tracingall. Even if you deliberately disable that in your code, the user can just take precautions before loading. As @UlrikeFischer says, a format does allow you to hide stuff but is tied to the architecture it's built on (so same engine version is required to use it). – Joseph Wright Nov 19 '15 at 08:19