function generateSalt(length) {
  var i, r = [];
  for (i = 0; i < length; ++i) {
    r.push(SALTCHARS[Math.floor(Math.random() * SALTCHARS.length)]);
  }
  return r.join('');
}
Generates a random salt, using a fast non-blocking PRNG (Math.random()).

@param {Number} length
@return {String}
@api private