Socket
Socket
Sign inDemoInstall

loader-utils

Package Overview
Dependencies
3
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

lib/hash/md4.js

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [2.0.1](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.1) (2021-10-29)
### Bug Fixes
* md4 support on Node.js v17 ([#193](https://github.com/webpack/loader-utils/issues/193)) ([1069f61](https://github.com/webpack/loader-utils/commit/1069f61284a571614ee4acdde6e6087174be118a))
## [2.0.0](https://github.com/webpack/loader-utils/compare/v1.4.0...v2.0.0) (2020-03-17)

@@ -7,0 +14,0 @@

20

lib/getHashDigest.js

@@ -42,2 +42,4 @@ 'use strict';

let createMd4 = undefined;
function getHashDigest(buffer, hashType, digestType, maxLength) {

@@ -47,4 +49,20 @@ hashType = hashType || 'md4';

const hash = require('crypto').createHash(hashType);
let hash;
try {
hash = require('crypto').createHash(hashType);
} catch (error) {
if (error.code === 'ERR_OSSL_EVP_UNSUPPORTED' && hashType === 'md4') {
if (createMd4 === undefined) {
createMd4 = require('./hash/md4');
}
hash = createMd4();
}
if (!hash) {
throw error;
}
}
hash.update(buffer);

@@ -51,0 +69,0 @@

2

package.json
{
"name": "loader-utils",
"version": "2.0.0",
"version": "2.0.1",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "utils for webpack loaders",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc