01: package org.bouncycastle.crypto.params;
02:
03: import org.bouncycastle.util.Arrays;
04:
05: public class DSAValidationParameters {
06: private byte[] seed;
07: private int counter;
08:
09: public DSAValidationParameters(byte[] seed, int counter) {
10: this .seed = seed;
11: this .counter = counter;
12: }
13:
14: public int getCounter() {
15: return counter;
16: }
17:
18: public byte[] getSeed() {
19: return seed;
20: }
21:
22: public int hashCode() {
23: return counter ^ Arrays.hashCode(seed);
24: }
25:
26: public boolean equals(Object o) {
27: if (!(o instanceof DSAValidationParameters)) {
28: return false;
29: }
30:
31: DSAValidationParameters other = (DSAValidationParameters) o;
32:
33: if (other.counter != this .counter) {
34: return false;
35: }
36:
37: return Arrays.areEqual(this.seed, other.seed);
38: }
39: }
|