6 Replies Latest reply on Jun 25, 2007 8:17 AM by Andrea Campolonghi

    Encryption in URL

    Andrea Campolonghi

      I need to pass some encrypted datas in a url string:
      My problem is that the default CF encrypt staff CFMX_COMPAT ofetn create string with special caracter like & that create problem in the decrypt process :
      in url mydate =54/8()&-Lj do not pass the full encrypted data cause & in a url break the string into 2 variables.

      So I tried the DES Algoritm as follow:
      <cfset list = "12,123,456" />
      <cfset key = generatesecretkey("DES")>
      <cfset list =encrypt(list, key, "DES", "Hex")/>
      <cfset list =decrypt(list, key, "DES", "Hex")/>

      An that's working fine but for decrypting in another template I have to pass the list crypted and the key......so it does not looks to me very safe.
      How may I decrypt a string encrypted using generatesecretkey in a different template form wich has generated that???

      Hope in all clear.