=====Kwyption===== Kwyption is a javascript encryption class developed from Paul A. Johnson's [[http://pajhome.org.uk/crypt/md5/md5src.html md5 library]] and John M. Hanna's [[http://sourceforge.net/users/jhanna777/ rc4 library]] to provide a convenient interface for encrypting and decrypting strings in javascript. A note of efficiency : the kwypt_string method basically double-encrypts a string twice using the rc4 method. This is highly inefficient (effectively tripling string length). But it does add a little more security for public data against brute-force trolling attacks. For basic rc4 encryption, there are encrypt and decrypt methods available. (See [[http://klenwell.googlecode.com/svn/trunk/JS/kwyption/kwyption.core.js kwyption.core.js]] and the [[http://klenwell.googlecode.com/svn/trunk/JS/kwyption/rick4.js Rick 4 class]].) **license** : [[http://www.opensource.org/licenses/gpl-license.php GPL2]] **source** : [[http://klenwell.googlecode.com/svn/trunk/JS/kwyption/ google code]] **demo** : [[http://klenwell.googlepages.com/demo.kwyption.htm klenwell.googlepages.com]] ====Sample Usage==== **simple example** %%(javascript) var debug = 0; var key = 'a simple key'; var plaintext = 'This is top secret. Reveal to no one. Unless they have the precious key.' var TheKwyptor = new Kwyption(debug); TheKwyptor.ini(key); var ciphertext = TheKwyptor.enkwypt_string(plaintext); alert(ciphertext); // will display something like: OLRHqz+$XDS3Mb+R3LOAlF55SiiU1v2ekAnh7$dw9IKMK612$FWKthCTlVg$ykpiwfW61oQ174ea6cc8187d9bbdd96358f1a279db43XuuKI$RrrEPKXGUNGievyp$gNOb@VgQ5Gop %% **working example** the code below is the actual code from [[http://klenwell.googlepages.com/demo.kwyption.htm the demo]] listed above %%(javascript)