Move from deprecated crypto package to built in node:crypto.

This commit is contained in:
blakemscurr
2023-02-14 13:19:16 +13:00
parent e3ab24c0e5
commit baee84e770
3 changed files with 1 additions and 14 deletions

View File

@@ -12,7 +12,6 @@
"circom_tester": "^0.0.19",
"circom-ecdsa": "github:0xPARC/circom-ecdsa",
"circomlib": "^2.0.5",
"crypto": "^1.0.1",
"ffjavascript": "^0.2.57",
"secp256k1_hash_to_curve_circom": "https://gitpkg.now.sh/geometryresearch/secp256k1_hash_to_curve/circuits?main"
},
@@ -2821,12 +2820,6 @@
"node": ">= 8"
}
},
"node_modules/crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
},
"node_modules/dasherize": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz",
@@ -8495,11 +8488,6 @@
"which": "^2.0.1"
}
},
"crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
},
"dasherize": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz",

View File

@@ -12,7 +12,6 @@
"circom_tester": "^0.0.19",
"circom-ecdsa": "github:0xPARC/circom-ecdsa",
"circomlib": "^2.0.5",
"crypto": "^1.0.1",
"ffjavascript": "^0.2.57",
"secp256k1_hash_to_curve_circom": "https://gitpkg.now.sh/geometryresearch/secp256k1_hash_to_curve/circuits?main"
},

View File

@@ -2,7 +2,7 @@ import { Point } from "@noble/secp256k1";
import { concatUint8Arrays, hexToBigInt } from "./utils/encoding";
import hashToCurve from "./utils/hashToCurve";
import { HashedPoint, multiplyPoint } from "./utils/curve";
import { createHash } from "crypto";
import { createHash } from "node:crypto";
export function computeHashMPk(
message: Uint8Array,