UNPKG
circomlib-backup
Version:
latest (0.0.23)
0.0.23
0.0.22
0.0.21
0.0.20
Basic circuits library for Circom
github.com/iden3/circomlib
iden3/circomlib
circomlib-backup
/
src
/
smt_hashes_mimc.js
11 lines
(8 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
mimc7 =
require
(
"./mimc7"
);
const
bigInt =
require
(
"snarkjs-backup"
).
bigInt
;
exports
.
hash0
=
function
(
left, right
) {
return
mimc7.
multiHash
(left, right); };
exports
.
hash1
=
function
(
key, value
) {
return
mimc7.
multiHash
([key, value], bigInt.
one
); };