Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

encrypt form post data before jQuery serialize

I am using ajax form submit. Here, i am using jQuery serialize.I like to encrypt(like md5) the data before submitting. How can i do this

my code

 var Data = $('#formid').serialize();
    $.post(url,  Data); 

Thanks

like image 596
Gowri Avatar asked Feb 05 '26 08:02

Gowri


2 Answers

Sounds like you are looking for SSL technology - in which case it will be seamless.

You don't code it - the browser will handle the encryption by itself.

See http://learn.iis.net/page.aspx/144/how-to-set-up-ssl-on-iis-7/ for how to configure IIS to manage SSL.

like image 197
BonyT Avatar answered Feb 07 '26 20:02

BonyT


Helpful advice.

MD5 is not really an encryption, but a one way hashing mechanism.

There is no (reliable) way to decrypt it.

The only real advantage of it is to compare the hash to other data that has been hashed in the same way.

MD5 in JavaScript?

There is no way to do it natively, but functions exist.

like image 24
alex Avatar answered Feb 07 '26 20:02

alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!