<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Co.ldFusion - ColdFusion - Pablo Varando&apos;s ColdFusion Blog - Encryption</title>
			<link>http://co.ldfusion.com/index.cfm</link>
			<description>This is the ColdFusion blog from the mind of Pablo Varando of EasyCFM.COM and CFM-Resources.COM</description>
			<language>en-us</language>
			<pubDate>Wed, 08 Sep 2010 08:19:02 -0500</pubDate>
			<lastBuildDate>Thu, 04 Dec 2008 12:37:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>webmaster@easycfm.com</managingEditor>
			<webMaster>webmaster@easycfm.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>webmaster@easycfm.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Co.ldFusion - ColdFusion - Pablo Varando&apos;s ColdFusion Blog</title>
				<link>http://co.ldfusion.com/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Encrypt() - Decrypt() Issues in ColdFusion 8.... Ugggg!</title>
				<link>http://co.ldfusion.com/index.cfm/2008/12/4/Encrypt--Decrypt-Issues-in-ColdFusion-8-Ugggg</link>
				<description>
				
				&lt;div class=&quot;encArticle&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;p&gt;So today I openned up an older application I previously developed in ColdFusion 7. I copied the files to my ColdFusion 8 environment and most everything worked... what didnt? Encryption and Decryption.&lt;/p&gt;
&lt;p&gt;I was passing in a &amp;quot;path&amp;quot; that is supposed to get encrypted and then passed in the URL.. but I kept getting pure gibberish... so I openned up the ColdFusion 8 documentation and started my search for a soltuion.&lt;/p&gt;

&lt;p&gt;This is the code I have in the ColdFusion 7 system; basically it&apos;s a UDF (User Defined Function) that will encrypt a string and then one that will decrypt a string; based on a common system key. Nothing fancy; but it shoudl work.... or should it?&lt;/p&gt;
&lt;code&gt;
&lt;cfscript&gt;
	//Encrypt a string and append it to URLEncrypted variables
	function EncString(theString){
		tNewString = Encrypt(theString, request.EncKey);
		tNewString = URLEncodedFormat(tNewString);
		return tNewString;
	}
	//Decrypt a string and return its value.
	function DecString(theString){
		tNewString = Decrypt(theString, request.EncKey);
		return tNewString;
	}
&lt;/cfscript&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So after a few hours of research, I found that I needed to add a few things to the code... particularly &lt;strong&gt;&apos;CFMX_COMPAT&apos;,&apos;Hex&apos;&lt;/strong&gt; those settings... without them it wasnt working! Uggg!&lt;/p&gt;
&lt;code&gt;
&lt;cfscript&gt;
	//Encrypt a string and append it to URLEncrypted variables
	function EncString(theString){
		tNewString = Encrypt(theString, request.EncKey, &apos;CFMX_COMPAT&apos;,&apos;Hex&apos;);
		tNewString = URLEncodedFormat(tNewString);
		return tNewString;
	}
	//Decrypt a string and return its value.
	function DecString(theString){
		tNewString = Decrypt(theString, request.EncKey, &apos;CFMX_COMPAT&apos;,&apos;Hex&apos;);
		return tNewString;
	}
&lt;/cfscript&gt;
&lt;/code&gt;
&lt;p&gt;Apparently, the documentation says that &amp;quot;CFMX_COMPAT&amp;quot; is supposed to be the &lt;strong&gt;&amp;quot;default&amp;quot;&lt;/strong&gt; encryption algorythm; however unless I define it... it wasnt working... Also you need the &amp;quot;Hex&amp;quot; definition right after it... I put that in and voila... it works!&lt;/p&gt;
&lt;p&gt;Just wanted to post it on here as it might help someone later on!&lt;/p&gt;
&lt;/div&gt; 
				</description>
				
				<category>Encryption</category>				
				
				<category>ColdFusion Coding</category>				
				
				<pubDate>Thu, 04 Dec 2008 12:37:00 -0500</pubDate>
				<guid>http://co.ldfusion.com/index.cfm/2008/12/4/Encrypt--Decrypt-Issues-in-ColdFusion-8-Ugggg</guid>
				
			</item>
			</channel></rss>