Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Encryption

Status
Not open for further replies.

TechnicalAnalysis

Programmer
Jul 2, 2001
169
US
I'd like to encrypt contents of the form before it gets post by ASP.
How do I add the Encryption function befoe the form is post?
I know how to do it by JavaScript. But I want it to be done on the server-side.
Is it possible? Does it mean that the transmission from the client-side to the serve is NOT encrypted if I do it on server-side?

Regards
 
That's correct. If you really want high security, you'll need to do it client side since in order for the server to do it, the contents will have to be sent back over the network to the server before it's encrypted -- free for all to see.
penny.gif
penny.gif
 
Thanks
My next question is
Can I pass JavaScript variable into ASP variable?
I wonder if I can decrypt an encrypted content of the form and pass the decrypted
content into a variable of ASP.
I understand that we can pass an ASP variable into JavaScript variable or function.
Does it work on reverse?


Regards
 
There are two options... one a good bit more complicated than the other.

First option to get a javascript variable to ASP is to take a round trip to the server... submitting a form, for example, with the encrypted variables going to the server via a form.

The second option is called Remote Scripting, and is something that I'm not personally familiar. By that I mean to say that I'm aware of its existence, but have no idea how to use it. Swany (a member of this forum) has written three FAQ's in the vbscript forum of this site on the subject -- how to set it up, what you need to run it, some examples, etc...

Remote scripting also makes a round trip to the server, but it does so without reloading the page -- a really cool concept that I keep meaning to look into. I would suggest looking into that if you have some time. Otherwise, I'd go with the old faithful method of doing a standard reload of the page, sending the encrypted content via a form.

There is also a FAQ in the vbscript forum that explains how to do the first option, too, but I suspect you already are familiar with the technique.

If you need some help with the first, just post back to this thread, and we'll work something up.

good luck! :)
Paul Prewett
penny.gif
penny.gif
 
In fact, posting something back to the server via a form is exactly what I have in mind.
I don't like that idea as it takes a lot longer. I'll look into the FAQ to see if option 2 is better.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top