jquery.crypt.js

This is a series of jquery functions I put together from a few source (listed in the source). the plugin easily encodes MD5 and SHA1 as well as encoding and decoding of Base64 and Xtea strings.

I have often used xtea / b64 encoding in my cgi's for years to provide strong method of passing variables in cookies etc. as xtea returns non ascii daata b64 is necessary in a text worlds

This is my first plugin, feel free to point out everything I did wrong (or right!) I'm fairly new to javascript and jquery, typically building our cgi's in ansi C.

Source: jquery.crypt.js
Version: 1.1.0
License: Dual MIT GPL
email scott at itsyndicate.ca

Changelog: 1.1.0
Rewrote plugin to use only one namespace item.

Examples:



(max 16 characters)


md5:
Call: $().crypt({method:"md5",source:$("#phrase").val()});

sha1:
Call: $().crypt({method:"sha1",source:$("#phrase").val()});


base64:
Call: $().crypt({method:"b64enc",source:$("#phrase").val()});

Call: $().crypt({method:"b64dec",source:b64});


xtea:
Call: $().crypt({method:"xteaenc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()});

Call: $().crypt({method:"xteadec",source:xtea,keyPass:$("#passPhrase").val()});


xtea and base64:
Call: $().crypt({method:"xteab64enc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()});

Call: $().crypt({method:"xteab64dec",source:xteab64,keyPass:$("#passPhrase").val()});


(This last one is just a wrapper so your code is cleaner in other functions.)
HOME | ITS SERVICES | SUPPORT | ABOUT US | CONTACT US | LEGAL | PRIVACY