Comparing version 3.0.2 to 3.0.3
@@ -100,3 +100,3 @@ "use strict"; | ||
@arg {boolean} [hashData = true] - sha256 hash data before signing | ||
@return {string} hex signature | ||
@return {string} string signature | ||
@example ecc.sign('I am alive', wif) | ||
@@ -106,3 +106,3 @@ */ | ||
var hashData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | ||
return Signature[hashData ? 'sign' : 'signHash'](data, privateKey).toHex(); | ||
return Signature[hashData ? 'sign' : 'signHash'](data, privateKey).toString(); | ||
}, | ||
@@ -109,0 +109,0 @@ |
@@ -132,3 +132,2 @@ 'use strict'; | ||
assert.equal(65, Buffer.from(sig, 'hex').length); | ||
assert(ecc.verify(sig, data, pubkey), 'verify data'); | ||
@@ -135,0 +134,0 @@ assert(ecc.verify(sig, dataSha256, pubkey, false), 'verify hash'); |
{ | ||
"name": "eosjs-ecc", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Elliptic curve cryptography functions", | ||
@@ -9,11 +9,11 @@ "keywords": "ECC, Private Key, Public Key, Signature, AES, Encryption, Decryption", | ||
"test": "mocha --use_strict src/*.test.js", | ||
"coverage": "istanbul cover _mocha -- -R spec src/*.test.js", | ||
"test_lib": "mocha --use_strict lib/*.test.js", | ||
"coverage": "nyc --reporter=html npm test", | ||
"coveralls": "npm run coverage && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls", | ||
"prepublish": "npm run build_lib && npm run docs", | ||
"build": "babel src --out-dir lib", | ||
"build_browser": "npm run build && mkdir -p dist && browserify -o dist/eosjs-ecc.js -s eosjs_ecc lib/index.js && sha256sum dist/eosjs-ecc.js", | ||
"build_browser_test": "npm run build && mkdir -p dist && browserify -o dist/test.js lib/*.test.js", | ||
"documentation": "node_modules/documentation/bin/documentation.js", | ||
"docs": "npm run documentation -- readme src/api_common.js --section \"Common API\" --shallow", | ||
"documentation": "node_modules/documentation/bin/documentation.js", | ||
"build": "npm run docs && npm run build_lib && npm run build_browser", | ||
"build_lib": "node_modules/babel-cli/bin/babel.js src --out-dir lib", | ||
"build_browser": "mkdir -p dist && browserify -o dist/eosjs-ecc.js -s eosjs_ecc src/index.js && sha256sum dist/eosjs-ecc.js", | ||
"build_browser_test": "mkdir -p dist && browserify -o dist/eosjs-ecc-test.js src/*.test.js" | ||
"prepublishOnly": "npm run build_browser && npm run test_lib && npm run docs" | ||
}, | ||
@@ -20,0 +20,0 @@ "repository": { |
@@ -136,3 +136,3 @@ [](https://www.npmjs.org/package/eosjs-ecc) | ||
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** hex signature | ||
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** string signature | ||
@@ -223,3 +223,3 @@ ### verify | ||
npm install | ||
npm run build | ||
npm run build_browser | ||
# builds: ./dist/eosjs-ecc.js | ||
@@ -226,0 +226,0 @@ # Verify release hash |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
65
8
1809831
34824