mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 11:16:42 +01:00
sha256 done
This commit is contained in:
14
circuits/sha256/shift.circom
Normal file
14
circuits/sha256/shift.circom
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
template ShR(n, r) {
|
||||
signal input in[n];
|
||||
signal output out[n];
|
||||
|
||||
for (var i=0; i<n; i++) {
|
||||
if (i+r >= n) {
|
||||
out[i] <== 0;
|
||||
} else {
|
||||
out[i] <== in[ i+r ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user