what-the-bank/sources/org/bouncycastle/jce/spec/ECParameterSpec.java

72 lines
1.9 KiB
Java

package org.bouncycastle.jce.spec;
import java.math.BigInteger;
import java.security.spec.AlgorithmParameterSpec;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPoint;
/* loaded from: classes6.dex */
public class ECParameterSpec implements AlgorithmParameterSpec {
private ECPoint G;
private ECCurve curve;
private BigInteger h;
private BigInteger n;
private byte[] seed;
public int hashCode() {
return getCurve().hashCode() ^ getG().hashCode();
}
public byte[] getSeed() {
return this.seed;
}
public BigInteger getN() {
return this.n;
}
public BigInteger getH() {
return this.h;
}
public ECPoint getG() {
return this.G;
}
public ECCurve getCurve() {
return this.curve;
}
public boolean equals(Object obj) {
if (!(obj instanceof ECParameterSpec)) {
return false;
}
ECParameterSpec eCParameterSpec = (ECParameterSpec) obj;
return getCurve().equals(eCParameterSpec.getCurve()) && getG().equals(eCParameterSpec.getG());
}
public ECParameterSpec(ECCurve eCCurve, ECPoint eCPoint, BigInteger bigInteger, BigInteger bigInteger2, byte[] bArr) {
this.curve = eCCurve;
this.G = eCPoint.normalize();
this.n = bigInteger;
this.h = bigInteger2;
this.seed = bArr;
}
public ECParameterSpec(ECCurve eCCurve, ECPoint eCPoint, BigInteger bigInteger, BigInteger bigInteger2) {
this.curve = eCCurve;
this.G = eCPoint.normalize();
this.n = bigInteger;
this.h = bigInteger2;
this.seed = null;
}
public ECParameterSpec(ECCurve eCCurve, ECPoint eCPoint, BigInteger bigInteger) {
this.curve = eCCurve;
this.G = eCPoint.normalize();
this.n = bigInteger;
this.h = BigInteger.valueOf(1L);
this.seed = null;
}
}