Comparing version 2.0.2 to 2.0.3
# eos-ecc changelog | ||
# v 2.0.3 | ||
- Updated dependencies. | ||
- Added sign hash test. | ||
# v 2.0.2 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "eos-ecc", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A universal JavaScript ECDSA packaged for EOS blockchain.", | ||
@@ -64,13 +64,13 @@ "main": "public/index.js", | ||
"coverage-node": "^5.0.1", | ||
"eslint": "^7.32.0", | ||
"eslint-config-env": "^21.0.0", | ||
"eslint": "^8.2.0", | ||
"eslint-config-env": "^23.0.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-compat": "^3.13.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-jsdoc": "^35.5.1", | ||
"eslint-plugin-jsdoc": "^37.0.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.4.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jsdoc-md": "^11.0.2", | ||
"prettier": "^2.4.1", | ||
"test-director": "^6.0.0" | ||
"test-director": "^7.0.0" | ||
}, | ||
@@ -80,4 +80,4 @@ "dependencies": { | ||
"ripemd160-js": "^1.2.0", | ||
"universal-ecdsa": "^1.1.2" | ||
"universal-ecdsa": "^1.1.3" | ||
} | ||
} |
'use strict' | ||
/** | ||
* Universally generate a strong psudorandom byte array. | ||
* Universally generate a psudorandom byte array. | ||
* @kind function | ||
@@ -6,0 +6,0 @@ * @name random_bytes |
@@ -45,5 +45,7 @@ 'use strict' | ||
const { r, s, racid } = await sign({ data: hex_array, private_key }) | ||
const i = 31 + racid // compressed (4) + compact key(27). | ||
const K1 = [75, 49] // K1 as ascii | ||
const raw_sig = new Uint8Array([i, ...r, ...s]) | ||
const hash = await ripemd160(Uint8Array.from([...raw_sig, ...K1])) | ||
@@ -50,0 +52,0 @@ const checksum = hash.slice(0, 4) |
16427
Updateduniversal-ecdsa@^1.1.3