![]() ![]() ![]() |
The command-line utility cfcrypt
can be used to encrypt any ColdFusion application. By default, the utility is installed in the /cfusion/bin
directory. It is especially useful for securing custom tag code before distributing it.
CFCRYPT uses the following syntax:
CFCRYPT infile outfile [/r /q] [/h "message"] /v"2"
The following options are supported:
cfcrypt Command Line Options | |
---|---|
Option |
Description |
input file |
Name of the file you want to encrypt. cfcrypt will not process an encrypted file. |
output file |
Path and filename of the output file. Warning: If no output file name is specified, a warning message asks if you want to continue. If you continue the process, the encrypted file overwrites the source file. |
/r |
Recursive, when used with wildcards, recurses through subdirectories to encrypt files. |
/q |
Suppresses warning messages. |
/h |
Header, allows custom header to be written to the top of the encrypted file(s). |
/v |
Required parameter that allows encryption using a specified version number. Use "1" for pages you want to be able to run on ColdFusion 3.x. Use "2" for pages you want to run strictly on ColdFusion 4.0 and later. |
cfcrypt c:\inetpub\wwwroot\myapp\entrypoint.cfm tags\custom01.cfm /h "The code in this custom tag is encrypted" /v "2"
This command encrypts entrypoint.cfm
for use with ColdFusion Server 4.0. and saves it to the subdirectory encryptedpages\enrtypoint.cfm
. If you attempt to open the output file for editing, only the message specified in the /h
option will be readable.
If you enter cfcrypt
without arguments, a message box appears (Windows) showing the command syntax you can use.
While it is possible to encrypt binary files with CFCRYPT, it is not recommended.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.