mirror of
https://github.com/arnaucube/circomlib.git
synced 2026-02-08 19:56:39 +01:00
Poseidon in SMT
This commit is contained in:
10
src/smt_hashes_mimc.js
Normal file
10
src/smt_hashes_mimc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const mimc7 = require("./mimc7");
|
||||
const bigInt = require("snarkjs").bigInt;
|
||||
|
||||
exports.hash0 = function (left, right) {
|
||||
return mimc7.multiHash(left, right);
|
||||
};
|
||||
|
||||
exports.hash1 = function(key, value) {
|
||||
return mimc7.multiHash([key, value], bigInt.one);
|
||||
};
|
||||
Reference in New Issue
Block a user