org.bouncycastle.crypto.params.CramerShoupPublicKeyParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-ext-debug-jdk15on Show documentation
Show all versions of bcprov-ext-debug-jdk15on Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8 with debug enabled.
package org.bouncycastle.crypto.params;
import java.math.BigInteger;
public class CramerShoupPublicKeyParameters extends CramerShoupKeyParameters {
private BigInteger c, d, h; // public key group elements
public CramerShoupPublicKeyParameters(CramerShoupParameters params, BigInteger c, BigInteger d, BigInteger h) {
super(false, params);
this.c = c;
this.d = d;
this.h = h;
}
public BigInteger getC() {
return c;
}
public BigInteger getD() {
return d;
}
public BigInteger getH() {
return h;
}
public int hashCode() {
return c.hashCode() ^ d.hashCode() ^ h.hashCode() ^ super.hashCode();
}
public boolean equals(Object obj) {
if (!(obj instanceof CramerShoupPublicKeyParameters)) {
return false;
}
CramerShoupPublicKeyParameters other = (CramerShoupPublicKeyParameters) obj;
return other.getC().equals(c) && other.getD().equals(d) && other.getH().equals(h) && super.equals(obj);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy