"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createHash = createHash;

var _webpack = require("webpack");

function createHash({
  outputOptions,
  content
}) {
  const {
    hashFunction,
    hashDigest,
    hashDigestLength
  } = outputOptions;

  const hash = _webpack.util.createHash(hashFunction);

  hash.update(content);
  return hash.digest(hashDigest).substring(0, hashDigestLength);
}