Morning everyone,

I'm trying to encrypt an id and pass it through a form... here's an example
of the code i'm using:

On the form page I do this:

        <cfset id = "stuff">
        <cfset id = encrypt(id, 23421)>
        <form action="form_encrypt_test.cfm" method="POST"
enctype="application/x-www-form-urlencoded">
        <cfoutput><input type="Text" name="id" value="#id#"></cfoutput>
        <input type="Submit" name="submit" value="submit">
        </form>
        <br>
        <cfoutput>
        ID Encrypted: #id#<br>
        ID Uncrypted: <cfset newid = decrypt(id, 23421)>
        #newid#
        </cfoutput>


On the result page, I'm trying to do this

<cfoutput>
ID Encrypted:#form.id#<br>

<cfset newid = trim(form.id)>
<cfset newid = decrypt(newid, 23421)>

ID Unecrypted: #newid#

</cfoutput>




Whenever I submit the form, the encrypted id looks exactly the same as it
was on the form submission page. However, Cold Fusion reports that "The
value to be decrypted is not valid"... Anyone have any ideas why?

Aaron

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to