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

@accumulators/core

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accumulators/core - npm Package Compare versions

Comparing version 2.0.4 to 3.0.1

3

lib/types/hasher.d.ts

@@ -7,2 +7,3 @@ export type hash = (data: string) => string;

export type HexString = string;
export declare const GENESIS_STRING = "brave new world";
export declare abstract class IHasher {

@@ -14,2 +15,4 @@ readonly options: HasherOptions;

static byteSize: (str: string) => number;
hashSingle(data: string): string;
getGenesis: () => HexString;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IHasher = exports.defaultHasherOptions = void 0;
exports.IHasher = exports.GENESIS_STRING = exports.defaultHasherOptions = void 0;
exports.defaultHasherOptions = {
blockSizeBits: 256,
};
exports.GENESIS_STRING = "brave new world";
class IHasher {

@@ -14,4 +15,15 @@ options;

static byteSize = (str) => new Blob([str.startsWith("0x") ? str.slice(2) : str]).size;
hashSingle(data) {
return this.hash([data]);
}
getGenesis = () => {
const s = exports.GENESIS_STRING;
let hex = "0x";
for (let i = 0; i < s.length; i++) {
hex += s.charCodeAt(i).toString(16).padStart(2, "0");
}
return this.hashSingle(hex);
};
}
exports.IHasher = IHasher;
//# sourceMappingURL=hasher.js.map

4

package.json
{
"name": "@accumulators/core",
"version": "2.0.4",
"version": "3.0.1",
"description": "A collection of TypeScript accumulators packages, each using the core package",

@@ -28,3 +28,3 @@ "keywords": [],

},
"gitHead": "72c3f1d9380cf8aaed4d33eda81593271c402915"
"gitHead": "46d7d26d5d12dbbe9dfba9e15e7ba375efd0ff49"
}

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