New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@appolo/utils

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appolo/utils - npm Package Compare versions

Comparing version 8.0.18 to 8.0.19

6

lib/crypto/hash.ts
import {Strings} from '../strings';
import {BinaryLike, createHash, BinaryToTextEncoding} from "crypto";
import {BinaryLike, createHash} from "crypto";
export class Hash {
public static hash(value: BinaryLike, algorithm: string = 'sha1', encoding: BinaryToTextEncoding = 'hex'): string {
public static hash(value: BinaryLike, algorithm: string = 'sha1', encoding: 'base64' | 'hex' = 'hex'): string {
return createHash(algorithm).update(value).digest(encoding);
}
public static hashPlainObject(obj: { [index: string]: string | number | boolean }, algorithm: string = 'sha1', encoding: BinaryToTextEncoding = 'hex'): string {
public static hashPlainObject(obj: { [index: string]: string | number | boolean }, algorithm: string = 'sha1', encoding: 'base64' | 'hex' = 'hex'): string {
return Hash.hash(Strings.stringifyObjectValues(obj),algorithm,encoding);

@@ -13,0 +13,0 @@ }

@@ -20,3 +20,3 @@ {

"main": "./index.js",
"version": "8.0.18",
"version": "8.0.19",
"license": "MIT",

@@ -34,12 +34,12 @@ "repository": {

"@types/benchmark": "^2.1.0",
"@types/chai": "^4.2.15",
"@types/chai": "^4.2.16",
"@types/lodash": "^4.14.168",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.27",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.37",
"benchmark": "^2.1.4",
"chai": "^4.3.0",
"mocha": "^8.3.0",
"chai": "^4.3.4",
"mocha": "^8.3.2",
"tslib": "^2.1.0",
"typescript": "^4.1.5"
"typescript": "^4.2.3"
}
}

Sorry, the diff of this file is not supported yet

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