Socket
Socket
Sign inDemoInstall

md5-hex

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

md5-hex - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

4

browser.js
'use strict';
var md5OMatic = require('md5-o-matic');
const md5OMatic = require('md5-o-matic');
module.exports = function (input) {
module.exports = input => {
if (Array.isArray(input)) {

@@ -6,0 +6,0 @@ input = input.join('');

'use strict';
var crypto = require('crypto');
const crypto = require('crypto');
module.exports = function (input) {
var hash = crypto.createHash('md5');
const hash = crypto.createHash('md5');
var update = function (buf) {
var inputEncoding = typeof buf === 'string' ? 'utf8' : undefined;
const update = buf => {
const inputEncoding = typeof buf === 'string' ? 'utf8' : undefined;
hash.update(buf, inputEncoding);

@@ -10,0 +10,0 @@ };

{
"name": "md5-hex",
"version": "1.3.0",
"version": "2.0.0",
"description": "Create a MD5 hash with hex encoding",

@@ -12,5 +12,4 @@ "license": "MIT",

},
"browser": "browser.js",
"engines": {
"node": ">=0.10.0"
"node": ">=4"
},

@@ -39,3 +38,4 @@ "scripts": {

"xo": "*"
}
},
"browser": "browser.js"
}

@@ -7,2 +7,4 @@ # md5-hex [![Build Status](https://travis-ci.org/sindresorhus/md5-hex.svg?branch=master)](https://travis-ci.org/sindresorhus/md5-hex)

Works in the browser too, when used with browserify/webpack.
Checkout [`hasha`](https://github.com/sindresorhus/hasha) if you need something more flexible.

@@ -36,3 +38,3 @@

Type: `buffer` `string` `array[string|buffer]`
Type: `Buffer` `string` `Buffer[]` `string[]`

@@ -39,0 +41,0 @@ Prefer buffers as they're faster to hash, but strings can be useful for small things.

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc