mirror of
https://github.com/logos-storage/logos-storage-proofs.git
synced 2026-02-01 20:23:10 +00:00
18 lines
367 B
Plaintext
18 lines
367 B
Plaintext
|
|
pragma circom 2.1.0;
|
||
|
|
|
||
|
|
include "../../node_modules/circomlib/circuits/poseidon.circom";
|
||
|
|
|
||
|
|
template PoseidonHash(SIZE) {
|
||
|
|
signal input in[SIZE];
|
||
|
|
signal input hash;
|
||
|
|
|
||
|
|
component hasher = Poseidon(SIZE);
|
||
|
|
for(var i = 0; i < SIZE; i++) {
|
||
|
|
hasher.inputs[i] <== in[i];
|
||
|
|
}
|
||
|
|
|
||
|
|
hasher.out === hash;
|
||
|
|
}
|
||
|
|
|
||
|
|
component main { public [hash] } = PoseidonHash(1);
|