function tx_rsaauth_encrypt(){var c=new RSAKey();c.setPublic(document.loginform.n.value,document.loginform.e.value);var d=document.loginform.username.value;var a=document.loginform.p_field.value;var b=c.encrypt(a);document.loginform.p_field.value="";document.loginform.e.value="";document.loginform.n.value="";if(b){document.loginform.userident.value="rsa:"+hex2b64(b)}}
function tx_rsaauth_feencrypt(d){if(d.pass.value.match(/^rsa:/)||d.n.value==""||d.e.value==""){return}var c=new RSAKey();c.setPublic(d.n.value,d.e.value);var e=d.user.value;var a=d.pass.value;var b=c.encrypt(a);d.pass.value="";d.e.value="";d.n.value="";if(b){d.pass.value="rsa:"+hex2b64(b)}};