index.js
function rollup(imbuff)
{
  var roll = new Buffer(0);
  Object.keys(imbuff).sort().forEach(function(id){
    roll = crypto.createHash('sha256').update(Buffer.concat([roll,new Buffer(id, 'hex')])).digest();
    roll = crypto.createHash('sha256').update(Buffer.concat([roll,imbuff[id]])).digest();
  });
  return roll;
}
function rollup(imbuff)
{
  var roll = new Buffer(0);
  Object.keys(imbuff).sort().forEach(function(id){
    roll = crypto.createHash('sha256').update(Buffer.concat([roll,new Buffer(id, 'hex')])).digest();
    roll = crypto.createHash('sha256').update(Buffer.concat([roll,imbuff[id]])).digest();
  });
  return roll;
}
function rollup ( imbuff ) { var roll = new Buffer ( 0 ) ; Object . keys ( imbuff ) . sort ( ) . forEach ( function ( id ) { roll = crypto . createHash ( 'sha256' ) . update ( Buffer . concat ( [ roll , new Buffer ( id , 'hex' ) ] ) ) . digest ( ) ; roll = crypto . createHash ( 'sha256' ) . update ( Buffer . concat ( [ roll , imbuff [ id ] ] ) ) . digest ( ) ; } ) ; return roll ; }
rollup uses only intermediate buffers, data must be validated first
rollup uses only intermediate buffers data must be validated first