Encrypting ColdFusion code

  • Post author:
  • Post category:Uncategorized

Often times you need to encrypt your CF source code. Maybe you’re on a shared host, and you don’t want people stealing things. Also, for shops that sell CF software, you don’t have to give them access to the source code. And of course, this encrypted code still runs on the CF server. :)Before CF 7, there was a tool called cfencode. It’s a command line utility that usually lives in /CFusionMX/bin. This comes from the Allaire days, and it is not very safe because there are utilities available on the web that will break the encryption. You can see how it works by running the file, and you will get a summary.CF 7 now offers a better tool, often referred to when sourceless deployment is discussed. It can be found in the same location as cfencode, but it’s called cfcompile. It will pre-compile your code down to Java bytecode. I believe this requires the Enterprise version of CF.