Fix sha256 last 448 test
This commit is contained in:
parent
3c2b566e68
commit
9941aac2f2
11
package-lock.json
generated
11
package-lock.json
generated
@ -601,10 +601,9 @@
|
||||
}
|
||||
},
|
||||
"circom": {
|
||||
"version": "0.0.34",
|
||||
"resolved": "https://registry.npmjs.org/circom/-/circom-0.0.34.tgz",
|
||||
"integrity": "sha512-R7yNW8PtX2xREtLYWZ/o5cfKHT/qa+CveXsGVAX1ej7mPrTat9mlEMXEy2vX//IuP9/cnYTY/KxJ2SN05PUeGA==",
|
||||
"dev": true,
|
||||
"version": "0.0.35",
|
||||
"resolved": "https://registry.npmjs.org/circom/-/circom-0.0.35.tgz",
|
||||
"integrity": "sha512-MWsJPYPH+s9wN2I5abEHUIAyFVsgTCy+UzJh///WnflXfh3c1tlbv8zt1VV+YHHREpyS+WF5ZBr7TujpaVFu5g==",
|
||||
"requires": {
|
||||
"big-integer": "^1.6.32",
|
||||
"optimist": "^0.6.1",
|
||||
@ -3863,7 +3862,6 @@
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "~0.0.1",
|
||||
"wordwrap": "~0.0.2"
|
||||
@ -3872,8 +3870,7 @@
|
||||
"wordwrap": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
|
||||
"dev": true
|
||||
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -26,12 +26,12 @@
|
||||
"dependencies": {
|
||||
"blake-hash": "^1.1.0",
|
||||
"blake2b": "^2.1.3",
|
||||
"circom": "0.0.35",
|
||||
"snarkjs": "^0.1.20",
|
||||
"typedarray-to-buffer": "^3.1.5",
|
||||
"web3": "^1.0.0-beta.55"
|
||||
},
|
||||
"devDependencies": {
|
||||
"circom": "0.0.35",
|
||||
"eslint-plugin-mocha": "^5.2.0",
|
||||
"ganache-cli": "^6.4.4",
|
||||
"mocha": "^5.2.0"
|
||||
|
@ -116,10 +116,10 @@ describe("SHA256 test", () => {
|
||||
const testStr = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
|
||||
|
||||
const b = Buffer.from(testStr, 'utf8');
|
||||
for (let i=0; i<64; i++) {
|
||||
/* for (let i=0; i<64; i++) {
|
||||
b[i] = i+1;
|
||||
}
|
||||
|
||||
*/
|
||||
const hash = crypto.createHash("sha256")
|
||||
.update(b)
|
||||
.digest("hex");
|
||||
|
Loading…
Reference in New Issue
Block a user