hashes.js
function binl(x, len) {
        var T, j, i, l,
          h0 = 0x67452301,
          h1 = 0xefcdab89,
          h2 = 0x98badcfe,
          h3 = 0x10325476,
          h4 = 0xc3d2e1f0,
          A1, B1, C1, D1, E1,
          A2, B2, C2, D2, E2;

        /* append padding */
        x[len >> 5] |= 0x80 << (len % 32);
        x[(((len + 64) >>> 9) << 4) + 14] = len;
        l = x.length;

        for (i = 0; i < l; i += 16) {
          A1 = A2 = h0;
          B1 = B2 = h1;
          C1 = C2 = h2;
          D1 = D2 = h3;
          E1 = E2 = h4;
          for (j = 0; j <= 79; j += 1) {
            T = safe_add(A1, rmd160_f(j, B1, C1, D1));
            T = safe_add(T, x[i + rmd160_r1[j]]);
            T = safe_add(T, rmd160_K1(j));
            T = safe_add(bit_rol(T, rmd160_s1[j]), E1);
            A1 = E1;
            E1 = D1;
            D1 = bit_rol(C1, 10);
            C1 = B1;
            B1 = T;
            T = safe_add(A2, rmd160_f(79 - j, B2, C2, D2));
            T = safe_add(T, x[i + rmd160_r2[j]]);
            T = safe_add(T, rmd160_K2(j));
            T = safe_add(bit_rol(T, rmd160_s2[j]), E2);
            A2 = E2;
            E2 = D2;
            D2 = bit_rol(C2, 10);
            C2 = B2;
            B2 = T;
          }

          T = safe_add(h1, safe_add(C1, D2));
          h1 = safe_add(h2, safe_add(D1, E2));
          h2 = safe_add(h3, safe_add(E1, A2));
          h3 = safe_add(h4, safe_add(A1, B2));
          h4 = safe_add(h0, safe_add(B1, C2));
          h0 = T;
        }
        return [h0, h1, h2, h3, h4];
      }
function binl(x, len) {
        var T, j, i, l,
          h0 = 0x67452301,
          h1 = 0xefcdab89,
          h2 = 0x98badcfe,
          h3 = 0x10325476,
          h4 = 0xc3d2e1f0,
          A1, B1, C1, D1, E1,
          A2, B2, C2, D2, E2;

        /* append padding */
        x[len >> 5] |= 0x80 << (len % 32);
        x[(((len + 64) >>> 9) << 4) + 14] = len;
        l = x.length;

        for (i = 0; i < l; i += 16) {
          A1 = A2 = h0;
          B1 = B2 = h1;
          C1 = C2 = h2;
          D1 = D2 = h3;
          E1 = E2 = h4;
          for (j = 0; j <= 79; j += 1) {
            T = safe_add(A1, rmd160_f(j, B1, C1, D1));
            T = safe_add(T, x[i + rmd160_r1[j]]);
            T = safe_add(T, rmd160_K1(j));
            T = safe_add(bit_rol(T, rmd160_s1[j]), E1);
            A1 = E1;
            E1 = D1;
            D1 = bit_rol(C1, 10);
            C1 = B1;
            B1 = T;
            T = safe_add(A2, rmd160_f(79 - j, B2, C2, D2));
            T = safe_add(T, x[i + rmd160_r2[j]]);
            T = safe_add(T, rmd160_K2(j));
            T = safe_add(bit_rol(T, rmd160_s2[j]), E2);
            A2 = E2;
            E2 = D2;
            D2 = bit_rol(C2, 10);
            C2 = B2;
            B2 = T;
          }

          T = safe_add(h1, safe_add(C1, D2));
          h1 = safe_add(h2, safe_add(D1, E2));
          h2 = safe_add(h3, safe_add(E1, A2));
          h3 = safe_add(h4, safe_add(A1, B2));
          h4 = safe_add(h0, safe_add(B1, C2));
          h0 = T;
        }
        return [h0, h1, h2, h3, h4];
      }
function binl ( x , len ) { var T , j , i , l , h0 = 0x67452301 , h1 = 0xefcdab89 , h2 = 0x98badcfe , h3 = 0x10325476 , h4 = 0xc3d2e1f0 , A1 , B1 , C1 , D1 , E1 , A2 , B2 , C2 , D2 , E2 ; /* append padding */ x [ len >> 5 ] |= 0x80 << ( len % 32 ) ; x [ ( ( ( len + 64 ) >>> 9 ) << 4 ) + 14 ] = len ; l = x . length ; for ( i = 0 ; i < l ; i += 16 ) { A1 = A2 = h0 ; B1 = B2 = h1 ; C1 = C2 = h2 ; D1 = D2 = h3 ; E1 = E2 = h4 ; for ( j = 0 ; j <= 79 ; j += 1 ) { T = safe_add ( A1 , rmd160_f ( j , B1 , C1 , D1 ) ) ; T = safe_add ( T , x [ i + rmd160_r1 [ j ] ] ) ; T = safe_add ( T , rmd160_K1 ( j ) ) ; T = safe_add ( bit_rol ( T , rmd160_s1 [ j ] ) , E1 ) ; A1 = E1 ; E1 = D1 ; D1 = bit_rol ( C1 , 10 ) ; C1 = B1 ; B1 = T ; T = safe_add ( A2 , rmd160_f ( 79 - j , B2 , C2 , D2 ) ) ; T = safe_add ( T , x [ i + rmd160_r2 [ j ] ] ) ; T = safe_add ( T , rmd160_K2 ( j ) ) ; T = safe_add ( bit_rol ( T , rmd160_s2 [ j ] ) , E2 ) ; A2 = E2 ; E2 = D2 ; D2 = bit_rol ( C2 , 10 ) ; C2 = B2 ; B2 = T ; } T = safe_add ( h1 , safe_add ( C1 , D2 ) ) ; h1 = safe_add ( h2 , safe_add ( D1 , E2 ) ) ; h2 = safe_add ( h3 , safe_add ( E1 , A2 ) ) ; h3 = safe_add ( h4 , safe_add ( A1 , B2 ) ) ; h4 = safe_add ( h0 , safe_add ( B1 , C2 ) ) ; h0 = T ; } return [ h0 , h1 , h2 , h3 , h4 ] ; }
Calculate the RIPE-MD160 of an array of little-endian words, and a bit length.
Calculate the RIPE - MD160 of an array of little - endian words and a bit length .