From edff6529282f73d5cd03466cb67043132a8c63a5 Mon Sep 17 00:00:00 2001 From: ruancheng Date: Wed, 9 Sep 2020 16:19:50 +0800 Subject: [PATCH 1/3] 1 support sm3 algorithm 2 upgrade version to 0.3.5 --- package.json | 2 +- src/index.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7db5749..42b65c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainsql-hashes", - "version": "0.3.4", + "version": "0.3.5", "description": "Compute hashes of chainsql objects", "license": "ISC", "scripts": { diff --git a/src/index.js b/src/index.js index 4e95b72..5cb3f58 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,10 @@ var keypairs = require('chainsql-keypairs'); function hash(hex) { if(keypairs.getCryptAlgType() === "gmAlg") { return keypairs.gmAlgSm3(new Buffer(hex, 'hex')); - } else { + }else if(keypairs.getCryptAlgType() === "softGMAlg"){ + var gmHash = keypairs.softGMAlgSm3(hex); + return gmHash; + }else { return sha512half(new Buffer(hex, 'hex')); } } From c6ea940533e3c34418b96d1a69fec094047e8a9a Mon Sep 17 00:00:00 2001 From: ruancheng Date: Wed, 9 Sep 2020 18:38:02 +0800 Subject: [PATCH 2/3] 1 modify chainsql-keypairs dependency 2 upgrade version to 0.3.6 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 42b65c6..f232977 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainsql-hashes", - "version": "0.3.5", + "version": "0.3.6", "description": "Compute hashes of chainsql objects", "license": "ISC", "scripts": { @@ -20,7 +20,7 @@ "create-hash": "^1.1.2", "chainsql-address-codec": "^2.0.3", "chainsql-binary-codec": "^0.1.26", - "chainsql-keypairs": "0.10.6" + "chainsql-keypairs": "^0.10.11" }, "devDependencies": { "mocha": "*" From bb7aded41d9d9ddf08abfb5bdccee0015c109dbe Mon Sep 17 00:00:00 2001 From: Mojicode Date: Mon, 15 Mar 2021 15:40:35 +0800 Subject: [PATCH 3/3] update 0.4.0 and update chainsql-kepair 0.11.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f232977..c463549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainsql-hashes", - "version": "0.3.6", + "version": "0.4.0", "description": "Compute hashes of chainsql objects", "license": "ISC", "scripts": { @@ -20,7 +20,7 @@ "create-hash": "^1.1.2", "chainsql-address-codec": "^2.0.3", "chainsql-binary-codec": "^0.1.26", - "chainsql-keypairs": "^0.10.11" + "chainsql-keypairs": "^0.11.1" }, "devDependencies": { "mocha": "*"