1 package civitas.common.mix;
2
3 import java.util.Arrays;
4
5 import org.springframework.stereotype.Controller;
6
7 @Controller
8 public class AddCommitmentToMix {
9 public void apply(final VoterMix that, final byte[] commitment) {
10 byte[][] commitments = that.getCommitments();
11 byte[][] n = Arrays.copyOf(commitments, commitments.length + 1);
12 n[commitments.length] = commitment.clone();
13 that.setCommitments(n);
14 }
15 }