UNPKG
@dorafactory/circomlib
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
Basic circuits library for Circom
github.com/iden3/circomlib
iden3/circomlib
@dorafactory/circomlib
/
src
/
smt_hashes_mimc.js
13 lines
(9 loc)
•
278 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
mimc7 =
require
(
"./mimc7"
);
const
bigInt =
require
(
"big-integer"
);
exports
.
hash0
=
function
(
left, right
) {
return
mimc7.
multiHash
(left, right); };
exports
.
hash1
=
function
(
key, value
) {
return
mimc7.
multiHash
([key, value], bigInt.
one
); };
exports
.
F
= mimc7.
F
;