From 072c82480e6e399b3ef94e5b417f4c58ac3edf18 Mon Sep 17 00:00:00 2001 From: Harvie Date: Thu, 6 Jan 2011 22:04:02 +0100 Subject: [PATCH] Moved rc4.js to DB --- wwwroot/js/rc4.js | 55 ----------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 wwwroot/js/rc4.js diff --git a/wwwroot/js/rc4.js b/wwwroot/js/rc4.js deleted file mode 100644 index a2c8a75..0000000 --- a/wwwroot/js/rc4.js +++ /dev/null @@ -1,55 +0,0 @@ -/* RC4 symmetric cipher encryption/decryption - * Copyright (c) 2006 by Ali Farhadi. - * released under the terms of the Gnu Public License. - * see the GPL for details. - * - * Email: ali[at]farhadi[dot]ir - * Website: http://farhadi.ir/ - */ - -/** - * Encrypt given plain text using the key with RC4 algorithm. - * All parameters and return value are in binary format. - * - * @param string key - secret key for encryption - * @param string pt - plain text to be encrypted - * @return string - */ -function rc4Encrypt(key, pt) { - s = new Array(); - for (var i=0; i<256; i++) { - s[i] = i; - } - var j = 0; - var x; - for (i=0; i<256; i++) { - j = (j + s[i] + key.charCodeAt(i % key.length)) % 256; - x = s[i]; - s[i] = s[j]; - s[j] = x; - } - i = 0; - j = 0; - var ct = ''; - for (var y=0; y