function encrypt(){ $('#cipher').val( $.rc4EncryptStr( $('#text').val(), $('#key').val() ) ); } function decrypt(){ $('#text').val( $.rc4DecryptStr( $('#cipher').val(), $('#key').val() ) ); }
$(document).ready(function(){ $('.testrc4').rc4({"key":"Testing"}); $('.testrc4de').rc4({"key":"Testing","method":"decrypt"}); });
$(document).ready(function(){ $('.testrc4').rc4({"key":"Testing"}); $('.testrc4de').rc4({"key":"Testing","method":"decrypt"}); //look familiar? });