fork download
  1. function huh(pw) {
  2. var b = Array(8, 0, 28, 20, 20, 12, 0, 8);
  3. var c = Array(0x71B131DD, 0xD965BB95, 0x99351B35, 0x313BB71B);
  4. for(var i=0; i<pw.length; i+=4) {
  5. var tmp = 0;
  6. for(var j=0; j<b.length; j++)
  7. tmp |= (pw.charCodeAt(i+j%4) & ((j>3) ? 0xF0 : 0xF)) << b[j];
  8. for(var j=31; j+1; c[i/4]>>=1)
  9. tmp ^= (c[i/4] & 1) << j--;
  10. if(++tmp) break;
  11. }
  12. log(tmp)
  13. return(i==16);
  14. }
Success #stdin #stdout 0.36s 42160KB
stdin
Standard input is empty
stdout
Standard output is empty