mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-06-20 04:04:14 -04:00
code style
This commit is contained in:
parent
a7fedcd7ea
commit
7eaa5fcb4f
8 changed files with 137 additions and 138 deletions
16
lib/MiMC.js
16
lib/MiMC.js
|
@ -1,13 +1,13 @@
|
|||
const circomlib = require('circomlib');
|
||||
const mimcsponge = circomlib.mimcsponge;
|
||||
const snarkjs = require('snarkjs');
|
||||
const circomlib = require('circomlib')
|
||||
const mimcsponge = circomlib.mimcsponge
|
||||
const snarkjs = require('snarkjs')
|
||||
|
||||
const bigInt = snarkjs.bigInt;
|
||||
const bigInt = snarkjs.bigInt
|
||||
|
||||
class MimcSpongeHasher {
|
||||
hash(level, left, right) {
|
||||
return mimcsponge.multiHash([bigInt(left), bigInt(right)]).toString();
|
||||
}
|
||||
hash(level, left, right) {
|
||||
return mimcsponge.multiHash([bigInt(left), bigInt(right)]).toString()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MimcSpongeHasher;
|
||||
module.exports = MimcSpongeHasher
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue