ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old February 26th, 2005, 05:01 PM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 182 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 h 41 m 17 sec
Reputation Power: 0
Arrow Encryption of CF code

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?

Reply With Quote
  #2  
Old February 27th, 2005, 08:34 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,611 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 10 m 21 sec
Reputation Power: 53
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

Reply With Quote
  #3  
Old February 27th, 2005, 06:35 PM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 182 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 h 41 m 17 sec
Reputation Power: 0
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>      

Reply With Quote
  #4  
Old February 27th, 2005, 07:32 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,611 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 10 m 21 sec
Reputation Power: 53
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Encryption of CF code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway