web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
458 B

  1. "use strict";
  2. /*
  3. Copyright 2018 Google LLC
  4. Use of this source code is governed by an MIT-style
  5. license that can be found in the LICENSE file or at
  6. https://opensource.org/licenses/MIT.
  7. */
  8. const crypto = require('crypto');
  9. /**
  10. * @param {WebpackAsset} asset
  11. * @return {string} The MD5 hash of the asset's source.
  12. *
  13. * @private
  14. */
  15. module.exports = asset => {
  16. return crypto.createHash('md5').update(Buffer.from(asset.source())).digest('hex');
  17. };