src/crypto_browser.js
function(data) {
      var bytesToPad, padding;
      bytesToPad = BLOCKSIZE - (data.length % BLOCKSIZE);
      padding = this.randomBytes(bytesToPad);
      return this.concat([padding, data]);
    }
function(data) {
      var bytesToPad, padding;
      bytesToPad = BLOCKSIZE - (data.length % BLOCKSIZE);
      padding = this.randomBytes(bytesToPad);
      return this.concat([padding, data]);
    }
function ( data ) { var bytesToPad , padding ; bytesToPad = BLOCKSIZE - ( data . length % BLOCKSIZE ) ; padding = this . randomBytes ( bytesToPad ) ; return this . concat ( [ padding , data ] ) ; }
Prepend padding to data to make it fill the blocksize.
@param {Buffer} data The data to pad.
@return {Buffer} The data with padding added.
Prepend padding to data to make it fill the blocksize .