lib/lodash/autokey.js
function __encode(raw, key) {

  var len = _.size(key);
  var cc = len; // key switch counter
  return new Buffer(_.map(raw, function(num, index) {

    if (cc-- > 0) {
      return (num + key.shift()) % 256;
    }
    return (num + raw[index - len]) % 256;
  }));
}
function __encode(raw, key) {

  var len = _.size(key);
  var cc = len; // key switch counter
  return new Buffer(_.map(raw, function(num, index) {

    if (cc-- > 0) {
      return (num + key.shift()) % 256;
    }
    return (num + raw[index - len]) % 256;
  }));
}
function __encode ( raw , key ) { var len = _ . size ( key ) ; var cc = len ; // key switch counter return new Buffer ( _ . map ( raw , function ( num , index ) { if ( cc -- > 0 ) { return ( num + key . shift ( ) ) % 256 ; } return ( num + raw [ index - len ] ) % 256 ; } ) ) ; }
body cipher encode

@function __encode
@param {Buffer} raw - data
@param {Array} key - user key
@return {Buffer}
body cipher encode