Solved

Encrypt a javascript/url variable with a coldfusion function

Posted on 2006-11-01
5
396 Views
Last Modified: 2013-12-20
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
Comment
Question by:jduawa
  • 3
5 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 17851854
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
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 17851861
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
 
LVL 20

Accepted Solution

by:
trailblazzyr55 earned 500 total points
ID: 17851878
here's another javascript string encryption method, bit better than the previous...

http://pajhome.org.uk/crypt/md5/
0
 
LVL 1

Author Comment

by:jduawa
ID: 17851910
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
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 17851962
Glad I could help! And good luck, let us know if you have any more questions...

Thanks,
~trail
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now