arnaucube
arnaucube/circomlibPublic Self-hosted repository
circomlib/src/smt_hashes_poseidon.js
src/smt_hashes_poseidon.jsRaw
 1const Poseidon = require("./poseidon");
 2const bigInt = require("big-integer");
 3
 4const hash = Poseidon.createHash(6, 8, 57);
 5
 6exports.hash0 = function (left, right) {
 7    return hash([left, right]);
 8};
 9
10exports.hash1 = function(key, value) {
11    return hash([key, value, bigInt.one]);
12};