@theqrl/hashchains
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"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" | ||
} | ||
} |
/* 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
703816
17966
+ Addedkeccak@^3.0.1
- Removedkeccak256@^1.0.2
- Removedbase64-js@1.5.1(transitive)
- Removedbn.js@5.2.1(transitive)
- Removedbuffer@6.0.3(transitive)
- Removedieee754@1.2.1(transitive)
- Removedkeccak256@1.0.6(transitive)