/* * jOCryption JavaScript data encryption v1.0 * * Copyright (c) 2011 Onyweb * Dual licensed under the MIT and GPL licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/gpl-2.0.php * * If you need any further information about this plugin please * contact me under contact@onyweb.fr */ var jOCryption = { publicExponent : null, publicModulus : null, publicTag : null, encrypt : function(string) { if (jOCryption.publicExponent == null || jOCryption.publicModulus == null || jOCryption.publicTag == null){ alert("La clef public ou le tag n'a pas été déclarée..."); return ""; }else{ var taggedString = jOCryption.publicTag + string; setMaxDigits(130); var key = new RSAKeyPair(jOCryption.publicExponent, "", jOCryption.publicModulus); var result = encryptedString(key, taggedString); return result; } } };