what-the-bank/sources/org/bouncycastle/crypto/params/CramerShoupParameters.java

50 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.crypto.params;
import java.math.BigInteger;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.Digest;
/* loaded from: classes6.dex */
public class CramerShoupParameters implements CipherParameters {
private Digest H;
private BigInteger g1;
private BigInteger g2;
private BigInteger p;
public int hashCode() {
return (getP().hashCode() ^ getG1().hashCode()) ^ getG2().hashCode();
}
public BigInteger getP() {
return this.p;
}
public Digest getH() {
this.H.reset();
return this.H;
}
public BigInteger getG2() {
return this.g2;
}
public BigInteger getG1() {
return this.g1;
}
public boolean equals(Object obj) {
if (!(obj instanceof DSAParameters)) {
return false;
}
CramerShoupParameters cramerShoupParameters = (CramerShoupParameters) obj;
return cramerShoupParameters.getP().equals(this.p) && cramerShoupParameters.getG1().equals(this.g1) && cramerShoupParameters.getG2().equals(this.g2);
}
public CramerShoupParameters(BigInteger bigInteger, BigInteger bigInteger2, BigInteger bigInteger3, Digest digest) {
this.p = bigInteger;
this.g1 = bigInteger2;
this.g2 = bigInteger3;
this.H = digest;
}
}