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

@theqrl/hashchains

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theqrl/hashchains - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

package.json
{
"name": "@theqrl/hashchains",
"version": "0.0.2",
"version": "0.0.3",
"description": "hashchains utilities",
"main": "src/index.js",
"browser": "dist/hashchains.js",
"scripts": {

@@ -66,4 +67,4 @@ "start": "nodemon --exec babel-node ./src/index.js",

"dependencies": {
"keccak256": "^1.0.2"
"keccak": "^3.0.1"
}
}

8

src/index.js
/* eslint max-classes-per-file: 0 */
const keccak256 = require('keccak256')
const keccak = require('keccak')

@@ -14,3 +14,3 @@ class HashChain {

if (this.hashFunction === 'keccak256') {
hc.push(keccak256(`${hc[i]}`).toString('hex'))
hc.push(keccak('keccak256').update(`${hc[i]}`).digest('hex'))
} else {

@@ -36,3 +36,5 @@ throw new Error('hash function not implemented')

if (this.hashFunction === 'keccak256') {
hashRoot = keccak256(`${mnemonic}${startingIndex + i}`).toString('hex')
hashRoot = keccak('keccak256')
.update(`${mnemonic}${startingIndex + i}`)
.digest('hex')
} else {

@@ -39,0 +41,0 @@ throw new Error('hash function not implemented')

Sorry, the diff of this file is too big to display

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