Something like:

<Cfoutput>
http://www.someserver.com/somepage.cfm?ID=#URLEncodedFormat(Encrypt(Your
RecordID,SomePassword))#
</cfoutput>

Then on the receiving page, do: 
<cftry>
<cfset ID = Decrypt(ID,SomePassword)>
<cfcatch type="any"><cfoutput>Somebody messed with the encrypted
text.</cfcatch>
</cftry>


The encryption w/ CF's Encrypt function isn't terribly strong, but it'll
at least keep your slightly above average user from messing with your
parameters in the URL.

Best regards,
Zac Bedell

> -----Original Message-----
> From: Douglas Jordon [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 31, 2001 5:12 PM
> To: CF-Talk
> Subject: encrypting url parameters
> 
> 
> Are there any simple methods of encrypting a url variable? I 
> need to pass a record id number around and would like to turn 
> it into text.
> 
> TIA,
> 
> Doug Jordon
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to