fixed-merkle-tree/src/mimc.js

4 lines
179 B
JavaScript
Raw Normal View History

2020-07-31 03:00:33 +02:00
const { mimcsponge } = require('circomlib')
const { bigInt } = require('snarkjs')
module.exports = (left, right) => mimcsponge.multiHash([bigInt(left), bigInt(right)]).toString()