I am having a helluva time decrypting a form variable that I have encrypted. I have no problem with an encrypted url variable just the form variable.
 
Here is some code to explain.
 
 
----------------------------------------------
<cfif IsDefined('url.variable')>
<cfset decrypted_url_variable = #Decrypt(url.variable,8)#>
<cfset url.variable = #decrypted_url_variable#>
<cfelse>
<!--- ::: DO NOTHING --->
</cfif>
 
<cfif IsDefined('form.variable)>
<cfset decrypted_form_variable = #Decrypt(form.variable,8)#>
<cfset form.variable = #decrypted_form_variable#>
<cfelse>
<!--- ::: DO NOTHING --->
</cfif>
----------------------------------------------
 
Yes, both variables have the same name. But they are different types. I thought this might cause a problem but even when I give
the variables different names the error is thrown. Here is the error:
 
----------------------------------------------

Error Diagnostic Information

An error occurred while evaluating the expression:

 decrypted_form_variable = #Decrypt(form.variable,8)#
The value to be decrypted is not valid
----------------------------------------------
I am at a serious loss. Thanks for any advice.
Best,
Erik

Reply via email to