function jappixmini_addon_xor(str1, str2) { if (str1.length != str2.length) throw "not same length"; encoded = ""; for (i=0; iRetype your Friendica password for chatting:'); div.append($("
")); input = $('') div.append(input); button = $(''); button.click(function(){ password = input.val(); jappixmini_addon_set_client_secret(password); div.remove(); }); div.append(button); $("body").append(div); } return client_secret; } function jappixmini_addon_encrypt_password(password) { client_secret = jappixmini_addon_get_client_secret(); // add \0 to password until it has the same length as secret if (password.length>client_secret.length-1) throw "password too long"; while (password.length