Socket
Socket
Sign inDemoInstall

kitx

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kitx - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

17

lib/index.js

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

exports.createHash = exports.makeHasher;
/**

@@ -70,7 +72,18 @@ * Get md5 hash digests of data

*/
exports.sha1 = function (data, key, encoding) {
return crypto.createHmac('sha1', key).update(data).digest(encoding);
exports.createHmac = function (algorithm) {
return function (data, key, encoding) {
return crypto.createHmac(algorithm, key).update(data).digest(encoding);
};
};
/**
* Get sha1 hash digests of data
* @param {String|Buffer} data data.
* @param {String} key the key.
* @param {String} encoding optionnal. can be 'hex', 'binary', 'base64'.
* @return {String|Buffer} if no encoding is provided, a buffer is returned.
*/
exports.sha1 = exports.createHmac('sha1');
/**
* Get a random value in a range

@@ -77,0 +90,0 @@ * @param {Number} min range start.

2

package.json
{
"name": "kitx",
"version": "1.2.1",
"version": "1.3.0",
"description": "toolkit",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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