This commit is contained in:
Jordi Baylina 2021-10-06 17:42:49 +02:00
parent 13e981b307
commit da3a6321f7
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
2 changed files with 1 additions and 4 deletions

View File

@ -12,12 +12,9 @@ exports.mimcsponge_printconstants = require("./src/mimcsponge_printconstants");
exports.mimcsponge_printcontract = require("./src/mimcsponge_printcontract"); exports.mimcsponge_printcontract = require("./src/mimcsponge_printcontract");
exports.pedersenHash = require("./src/pedersenHash"); exports.pedersenHash = require("./src/pedersenHash");
exports.pedersen_printbases = require("./src/pedersen_printbases"); exports.pedersen_printbases = require("./src/pedersen_printbases");
exports.poseidon_constants = require("./src/poseidon_constants");on
exports.poseidon_constants_opt = require("./src/poseidon_constants_opt");on
exports.poseidon_gencontract = require("./src/poseidon_gencontract"); exports.poseidon_gencontract = require("./src/poseidon_gencontract");
exports.poseidon = require("./src/poseidon"); exports.poseidon = require("./src/poseidon");
exports.poseidon_printcontract = require("./src/poseidon_printcontract"); exports.poseidon_printcontract = require("./src/poseidon_printcontract");
exports.poseidon_printmatrix = require("./src/poseidon_printmatrix");
exports.poseidon_slow = require("./src/poseidon_slow"); exports.poseidon_slow = require("./src/poseidon_slow");
exports.smt_hashes_mimc = require("./src/smt_hashes_mimc"); exports.smt_hashes_mimc = require("./src/smt_hashes_mimc");
exports.smt_hashes_poseidon = require("./src/smt_hashes_poseidon"); exports.smt_hashes_poseidon = require("./src/smt_hashes_poseidon");

View File

@ -12,7 +12,7 @@ exports.getIV = (seed) => {
if (typeof seed === "undefined") seed = SEED; if (typeof seed === "undefined") seed = SEED;
const c = Web3Utils.keccak256(seed+"_iv"); const c = Web3Utils.keccak256(seed+"_iv");
const cn = Scalar.fromString(Web3Utils.toBN(c).toString()); const cn = Scalar.fromString(Web3Utils.toBN(c).toString());
const iv = cn.mod(F.p); const iv = Scalar.mod(cn, F.p);
return iv; return iv;
}; };