function createETagGenerator (options) {
  return function generateETag (body, encoding) {
    var buf = !Buffer.isBuffer(body)
      ? Buffer.from(body, encoding)
      : body

    return etag(buf, options)
  }
}
Create an ETag generator function, generating ETags with
the given options.

@param {object} options
@return {function}
@private