Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Encrypt a javascript/url variable with a coldfusion function

I have a page that passes information to another file which inserts that info into a DB via url variable.  the url variable is passed to the page that does the insert/update asynchronously using javascript.   What i would liek to do is enrypt that url variable before it gets sent via the ajax call.  I am hoping that there is a) a javascript function that can act liek the cf encrypt() function or b use wddx somehow to pass the information between js and cf before being sent via the url.
0
jduawa
Asked:
jduawa
  • 3
1 Solution
 
SidFishesCommented:
are you trying to obscure the url value or simply trying to encrypt the ajax call?

If you are passing sensitive data via ajax just use https instead of http in the script call
0
 
trailblazzyr55Commented:
here's a javascript function you can do that does a type of encryption... I don't believe there is a built in function like CF has..

http://javascript.internet.com/passwords/xor-encryption4.html
0
 
trailblazzyr55Commented:
here's another javascript string encryption method, bit better than the previous...

http://pajhome.org.uk/crypt/md5/
0
 
jduawaAuthor Commented:
i think what i will have to do is create or use an existing javascript function to encrypt the url variable before it is passed then on the page that processes it ieither use a ajvascript function to decrypt it or write a small java program to do the decrytion and call that with CF
thanks for th einiput
0
 
trailblazzyr55Commented:
Glad I could help! And good luck, let us know if you have any more questions...

Thanks,
~trail
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now