libs/sjcl.js
function (bytes) {
    var out = [], i, tmp=0;
    for (i=0; i<bytes.length; i++) {
      tmp = tmp << 8 | bytes[i];
      if ((i&3) === 3) {
        out.push(tmp);
        tmp = 0;
      }
    }
    if (i&3) {
      out.push(sjcl.bitArray.partial(8*(i&3), tmp));
    }
    return out;
  }
function (bytes) {
    var out = [], i, tmp=0;
    for (i=0; i<bytes.length; i++) {
      tmp = tmp << 8 | bytes[i];
      if ((i&3) === 3) {
        out.push(tmp);
        tmp = 0;
      }
    }
    if (i&3) {
      out.push(sjcl.bitArray.partial(8*(i&3), tmp));
    }
    return out;
  }
function ( bytes ) { var out = [ ] , i , tmp = 0 ; for ( i = 0 ; i < bytes . length ; i ++ ) { tmp = tmp << 8 | bytes [ i ] ; if ( ( i & 3 ) === 3 ) { out . push ( tmp ) ; tmp = 0 ; } } if ( i & 3 ) { out . push ( sjcl . bitArray . partial ( 8 * ( i & 3 ) , tmp ) ) ; } return out ; }
Convert from an array of bytes to a bitArray.
Convert from an array of bytes to a bitArray .