sheryi26 Posted December 28, 2010 Share Posted December 28, 2010 Hi, I have a javascript function, its name is "MD5(string str)" inside of a ".js" file as "encryption.js"I want to call this function in the behind code of .ascx(the user control)file, but I can't and its error said "The name MD5 does not exist in the current context" I know and I had tried many solutions, but they were not correct!I appreciate any help for my problem...txtPasswordHash.Text = MD5(txtPassword.Text);.. . Link to comment Share on other sites More sharing options...
Starfall Posted January 2, 2011 Share Posted January 2, 2011 It is because JavaScript does not support hashing.There IS a valid hashing technique though. Download this file, and extract them to a valid directory in your website or webserver.Then write a script like this: <script type="text/javascript" src="md5-min file path"></script><script type="text/javascript">function y(str){var x=hex_md5(str);// What you want to do with the hash...}</script> It should work perfect. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.