|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
Do you encrypt everything on the page including the <html> <head> <body> tags or only the coldfusion part?
i used the encrypt function and got the encrypted code but now what do i do with it? |
|
#2
|
|||
|
|||
|
What do you want to do with it?
To encrypt the template did you use the cfencode.exe file? Or are you using the encrypt() function? These do totally different things.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
||||
|
||||
|
i have to give access to my code to a web designer. I dont want them to be able to read the code hence i want to encrypt it.
Im using the encrypt function through a form heres the code to the form. so should i include the html, body etc. tags when i encrypt it? and when i get the encrypted string do i save the page and even though i looks like scrambled garbage itll work on the server? thx for your time Code:
<HTML>
<HEAD>
<TITLE>Encrypting and Decrypting Example</TITLE>
</HEAD>
<BODY>
<P>This example allows for the encryption and decryption of
string. Try it out by entering your own string and a key of your
own choosing and seeing the results.
<CFIF IsDefined("FORM.myString")>
<CFSET string = FORM.myString>
<CFSET key = FORM.myKey>
<CFSET encrypted = encrypt(string, key)>
<CFSET decrypted = decrypt(encrypted, key)>
<CFOUTPUT>
<H4><B>The string:</B></H4> #string# <BR>
<H4><B>The string's length:</B></H4> #len(string)# <BR>
<H4><B>The key:</B></H4> #key#<BR>
<H4><B>Encrypted:</B></H4> #encrypted#<BR>
<H4><B>The encrypted string's length:</B></H4> #len(encrypted)# <BR>
<H4><B>Decrypted:</B></H4> #decrypted#<BR>
<H4><B>The decrypted string's length:</B></H4> #len(decrypted)# <BR>
</CFOUTPUT>
</CFIF>
<FORM ACTION="encryptmystring.cfm" METHOD="post">
<P>Input your key:
<P><INPUT TYPE="Text" NAME="myKey" VALUE="foobar">
<P>Input your string to be encrypted:
<P><textArea NAME="myString" cols="40" rows="5" WRAP="VIRTUAL">
This string will be encrypted (try typing some more)
</textArea>
<INPUT TYPE="Submit" VALUE="Encrypt my String">
</FORM>
</BODY>
</HTML>
|
|
#4
|
|||
|
|||
|
No, what you're asking for can't be done. The encrypt() function is to encrypt data, not CFML code. The only way to encrypt your actual source code is to use the cfencode.exe file and it encrypts the entire file.
I would recommend you break up the page so that the sections that you want to allow the designers to modify are in their own separate files. Then you include those files into your main code file(s) and encrypt everything except those include files. Or you could just grant modify permissions on the include files to the designers, and deny them modify to everything else. Then you wouldn't even have to encrypt the files at all. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Encryption of CF code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|