/**
 * Fichiers sha256.js et login.js concaténés et minifiés
 */
var chrsz=8;function safe_add(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535}function S(a,b){return a>>>b|a<<32-b}function R(a,b){return a>>>b}function Ch(a,b,c){return a&b^~a&c}function Maj(a,b,c){return a&b^a&c^b&c}function Sigma0256(a){return S(a,2)^S(a,13)^S(a,22)}function Sigma1256(a){return S(a,6)^S(a,11)^S(a,25)}function Gamma0256(a){return S(a,7)^S(a,18)^R(a,3)}function Gamma1256(a){return S(a,17)^S(a,19)^R(a,10)}
function core_sha256(a,b){var c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,
3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),g,k,l,q,h,m,n,r,p,e,t,u;a[b>>5]|=128<<24-b%32;a[(b+32>>9<<4)+15]=b;for(p=0;p<a.length;p+=16){g=d[0];k=d[1];l=d[2];q=d[3];h=d[4];m=d[5];n=d[6];r=d[7];for(e=0;64>e;e++)f[e]=16>e?a[e+p]:
safe_add(safe_add(safe_add(Gamma1256(f[e-2]),f[e-7]),Gamma0256(f[e-15])),f[e-16]),t=safe_add(safe_add(safe_add(safe_add(r,Sigma1256(h)),Ch(h,m,n)),c[e]),f[e]),u=safe_add(Sigma0256(g),Maj(g,k,l)),r=n,n=m,m=h,h=safe_add(q,t),q=l,l=k,k=g,g=safe_add(t,u);d[0]=safe_add(g,d[0]);d[1]=safe_add(k,d[1]);d[2]=safe_add(l,d[2]);d[3]=safe_add(q,d[3]);d[4]=safe_add(h,d[4]);d[5]=safe_add(m,d[5]);d[6]=safe_add(n,d[6]);d[7]=safe_add(r,d[7])}return d}
function str2binb(a){var b=[],c;chrsz=8;for(c=0;c<a.length;c++)127<a.charCodeAt(c)&&(chrsz=16);var d=(1<<chrsz)-1;for(c=0;c<a.length*chrsz;c+=chrsz)b[c>>5]|=(a.charCodeAt(c/chrsz)&d)<<24-c%32;return b}function binb2hex(a){for(var b="",c=0;c<4*a.length;c++)b+="0123456789abcdef".charAt(a[c>>2]>>8*(3-c%4)+4&15)+"0123456789abcdef".charAt(a[c>>2]>>8*(3-c%4)&15);return b}function hex_sha256(a){return binb2hex(core_sha256(str2binb(a),a.length*chrsz))}
function sha256_self_test(){return"f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650"==hex_sha256("message digest")}var login_info;console.log(login_info);function affiche_login_secure(){login_info.alea_actuel?jQuery("#pass_securise").show():jQuery("#pass_securise").hide()}
function informe_auteur(a){login_info.informe_auteur_en_cours=!1;(a=jQuery.parseJSON(a))?(login_info.alea_actuel=a.alea_actuel,login_info.alea_futur=a.alea_futur,jQuery("input#session_remember:not(.modifie)").prop("checked","1"==a.cnx?!0:!1)):login_info.alea_actuel="";a.logo?jQuery("#spip_logo_auteur").html(a.logo):jQuery("#spip_logo_auteur").html("");affiche_login_secure()}
function calcule_hash_pass(a){if((login_info.alea_actuel||login_info.alea_futur)&&!a.match(/^\{([0-9a-f]{32});([0-9a-f]{32})\}$/i)&&!a.match(/^\{([0-9a-f]{64});([0-9a-f]{64});([0-9a-f]{32});([0-9a-f]{32})\}$/i)&&sha256_self_test()){var b="",b=hex_sha256(login_info.alea_actuel+a),b=b+";"+hex_sha256(login_info.alea_futur+a);window.calcMD5&&(b=b+";"+calcMD5(login_info.alea_actuel+a),b=b+";"+calcMD5(login_info.alea_futur+a));jQuery("input[name=password]").prop("value","{"+b+"}")}}
function actualise_auteur(){login_info.login!=jQuery("#var_login").prop("value")&&(login_info.informe_auteur_en_cours=!0,login_info.login=jQuery("#var_login").prop("value"),jQuery.get(login_info.page_auteur,{var_login:login_info.login,var_compteur:(new Date).getTime()},informe_auteur))}
function login_submit(){actualise_auteur();var a=jQuery("input[name=password]"),b=a.prop("value");if(b){if(login_info.informe_auteur_en_cours&&5>login_info.attente_informe)return login_info.attente_informe++,jQuery("form#formulaire_login").animeajax().find("p.boutons input").before("."),setTimeout(function(){jQuery("form#formulaire_login").submit()},1E3),!1;login_info.alea_actuel||login_info.alea_futur?(a.after('<input name="password" type="hidden" value="" />').prop("value",b),a.prop("name","nothing").prop("value",
""),calcule_hash_pass(b)):login_info.informe_auteur_en_cours&&a.prop("value","")}};