I have set up an instance of an encryption class in the server scope
on one of our servers so that all applications on our server can
access it.   I call the encryption function like this:

#server.encryption.AESEncrypt("My Cool String")#

After a series of actions, "My Cool String" that has been passed to
the CFC is then sent to an encryption DLL component, like this:

<cfscript>
private.encrypted =
variables.aesEncryption.SetStringVal(toString(arguments.string),[unrelated
parameter],[unrelated parameter]);
return private.encrypted;
</cfscript>

I was converting a test database of thousands of different test
passwords, and found that I needed to add that toString() function due
to some values that were making it barf.  One lingering issue is
giving me grief.  It is a string "private".  ColdFusion is giving me
an error:
-- Complex object types cannot be converted to simple values.. 

Interestingly I found that I received a slightly different error when
I tried to pass a string "variables" or "request", etc.  But the
bottom line is that it is confusing the string with named data
structures.

If I just call the DLL from the CFM page like this, I have no problems:
<cfset myVariable = "private" />
#variables.aesEncryption.SetStringVal(toString(myVariable), [unrelated
parameter],[unrelated parameter])#

  It is only happening when the value is passed as an argument to the
CFC and then to the DLL.

Am I missing something obvious here that anyone else sees?

Thanks!

-- 
~Dave Shuck
[EMAIL PROTECTED]
www.worldwildweb.biz
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to