arnaucube
arnaucube/circomPublic Self-hosted repository
circom/circuits/sha256/shift.circom
circuits/sha256/shift.circomRaw
 1
 2template ShR(n, r) {
 3    signal input in[n];
 4    signal output out[n];
 5
 6    for (var i=0; i<n; i++) {
 7        if (i+r >= n) {
 8            out[i] <== 0;
 9        } else {
10            out[i] <== in[ i+r ];
11        }
12    }
13}
14