var url = "DocumentId="+DocumentID+"&SectionType=1&RecID="+RecipientID;
window.open ( "../EBox/ShowLetter.aspx?Url="+encodeURIComponent(url),'PrintMail' , features );
Instead of encodi开发者_运维问答ng I want ot encrypt the url . What is the solution for this?
If it has to be secure, javascript is the wrong place to go. Anything done in javascript will be visible to a hacker, who will easily get an encrypted string.
Use HTTP with SSL (HTTPS). Everything sent between the client and the server (including the URL in the HTTP GET request) will be encrypted.
Obviously, this won't hide the data from the user, but since it starts in unencrypted form in the browser (the data you were planning to input into the JS encryption routine), nothing will.
精彩评论