jQuery doesnt have a method to provide the md5 of a string. So you need to use some external script. There is a plugin called jQuery MD5. and it gives you number of methods to achieve md5. Few of those are
Create (hex-encoded) MD5 hash of a given string value:
var md5 = $.md5('value');
Create (hex-encoded) HMAC-MD5 hash of a given string value and key:
var md5 = $.md5('value', 'key');
Create raw MD5 hash of a given string value:
var md5 = $.md5('value', null, true);
Create raw HMAC-MD5 hash of a given string value and key:
var md5 = $.md5('value', 'key', true);
This might do what you want... Check the snippet here. jQuery MD5