ethereumjs-util
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -9,2 +9,10 @@ # Changelog | ||
## [5.2.1] - 2020-07-17 | ||
This release replaces the native `secp256k1` and `keccak` dependencies with | ||
[ethereum-cryptopgraphy](https://github.com/ethereum/js-ethereum-cryptography) | ||
which doesn't need native compilation. | ||
[5.2.1]: https://github.com/ethereumjs/ethereumjs-util/compare/v5.2.0...v5.2.1 | ||
## [5.2.0] - 2018-04-27 | ||
@@ -11,0 +19,0 @@ - Rename all ``sha3`` hash related constants and functions to ``keccak``, see |
@@ -5,4 +5,9 @@ 'use strict'; | ||
var createKeccakHash = require('keccak'); | ||
var secp256k1 = require('secp256k1'); | ||
var _require = require('ethereum-cryptography/keccak'), | ||
keccak224 = _require.keccak224, | ||
keccak384 = _require.keccak384, | ||
k256 = _require.keccak256, | ||
keccak512 = _require.keccak512; | ||
var secp256k1 = require('./secp256k1-adapter'); | ||
var assert = require('assert'); | ||
@@ -238,3 +243,24 @@ var rlp = require('rlp'); | ||
return createKeccakHash('keccak' + bits).update(a).digest(); | ||
switch (bits) { | ||
case 224: | ||
{ | ||
return keccak224(a); | ||
} | ||
case 256: | ||
{ | ||
return k256(a); | ||
} | ||
case 384: | ||
{ | ||
return keccak384(a); | ||
} | ||
case 512: | ||
{ | ||
return keccak512(a); | ||
} | ||
default: | ||
{ | ||
throw new Error('Invald algorithm: keccak' + bits); | ||
} | ||
} | ||
}; | ||
@@ -241,0 +267,0 @@ |
{ | ||
"name": "ethereumjs-util", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "a collection of utility functions for Ethereum", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"test:node": "npm run build:dist && istanbul test mocha -- --reporter spec", | ||
"build:dist": "babel index.js --source-root ./ -d ./dist", | ||
"build:dist": "babel index.js secp256k1-adapter.js secp256k1-lib/* --source-root ./ -d ./dist", | ||
"build:docs": "documentation build ./index.js --github --sort-order='alpha' -f md > ./docs/index.md" | ||
@@ -109,7 +109,7 @@ }, | ||
"create-hash": "^1.1.2", | ||
"ethereum-cryptography": "^0.1.3", | ||
"elliptic": "^6.5.2", | ||
"ethjs-util": "^0.1.3", | ||
"keccak": "^1.0.2", | ||
"rlp": "^2.0.0", | ||
"safe-buffer": "^5.1.1", | ||
"secp256k1": "^3.0.1" | ||
"safe-buffer": "^5.1.1" | ||
}, | ||
@@ -133,3 +133,3 @@ "devDependencies": { | ||
"mocha": "^4.0.0", | ||
"standard": "*" | ||
"standard": "^11.0.1" | ||
}, | ||
@@ -136,0 +136,0 @@ "standard": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66794
8
1179
+ Addedelliptic@^6.5.2
+ Addedethereum-cryptography@^0.1.3
+ Added@types/node@22.7.4(transitive)
+ Added@types/pbkdf2@3.1.2(transitive)
+ Added@types/secp256k1@4.0.6(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedblakejs@1.2.1(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbs58check@2.1.2(transitive)
+ Addedethereum-cryptography@0.1.3(transitive)
+ Addedkeccak@3.0.4(transitive)
+ Addednode-addon-api@2.0.2(transitive)
+ Addednode-gyp-build@4.8.2(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedscrypt-js@3.0.1(transitive)
+ Addedsecp256k1@4.0.3(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removedkeccak@^1.0.2
- Removedsecp256k1@^3.0.1
- Removedbindings@1.5.0(transitive)
- Removedbip66@1.1.5(transitive)
- Removeddrbg.js@1.0.1(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedkeccak@1.4.0(transitive)
- Removednan@2.20.0(transitive)
- Removedsecp256k1@3.8.0(transitive)