Encrypt()/decrypt() are available from CF, though they generate nasty
strings.  Cfusion_encrypt()/cfusion_decrypt() are undocumented, but have
been around since at least 4, and generate only alphanumaric strings.  I
don't know about performance for either one, but I'd imagine it's small
enough to be considered insignificant.

For an app I wrote a while ago (several years) we had to maintain numeric
Ids, but they could be any length (no max).  We used numbers that were
always 20 digits long where the first and third digits were the length of
the number we were encrypting, and the even numbered digits where the actual
number, starting with 2, and going as long as we needed.  The rest of the
digits were all random.  So the number "1234" would be encrypted like this:

01429394999999999999
^.^...................length
.^.^.^.^..............number
....^.^.^^^^^^^^^^^^..padding
Where I've used the digit '9' for ALL the random digits, rather than
actually selecting random ones.  It was a bit of a pain, because it was 4.5,
so no UDFs, but now that UDFs are available, it'd be a snap.

Cheers,
barneyb

> -----Original Message-----
> From: Che Vilnonis [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 12:56 PM
> To: CF-Talk
> Subject: Another simple question...
>
> This is for a CF5 webserver.
> I have the following URL.
> http://somesite.com/cnt_ask_an_expert_detail.cfm?id=114
>
> Basically, I would like to have some simple encryption on the URL.ID
> variable.
> Nothing fancy...just something that the average website user
> would not try
> to
> manipulate. The solution should be the LEAST taxing to the
> CFAS. Also, this
> solution should obviously be decryptable. Maybe there is a CF
> function that
> I
> have forgotton or unaware of...
>
> Thanks, Che
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to