Skip to main content
July 26, 2011
Question

Encrypt Error

  • July 26, 2011
  • 1 reply
  • 1615 views

I am having syntax issues setting up the encrypt coding

encrypted=encrypt(Form.Number, theKey, Form.myAlgorithm, Form.myEncoding);

Would I write it something like this?

<cfset encrypted=encrypt(Form.Number, #application.theKey#, AES, Hex)>

Would that coding work?  It hasn't for me and I am having trouble finding my error.

    This topic has been closed for replies.

    1 reply

    12Robots
    Participating Frequently
    July 26, 2011

    You're missing some quotes for sure.  Mind telling us what the error is?

    It should probably read:

    <cfset encrypted=encrypt(Form.Number, application.theKey, "AES", "Hex")>

    July 26, 2011

    what if I am replacing Form.Number with a string of characters and then outputing that to a page to see what I end up with how would I hard code this code to say use the word funfilled instead of form.number.

    12Robots
    Participating Frequently
    July 26, 2011

    Seriously?

    <cfset encrypted=encrypt("funfilled", application.theKey, "AES", "Hex")>

    Jason