//@Override public override int GetHashCode() { int prime = 31; int result = 1; result = prime * result + B; result = prime * result + N; result = prime * result + ((basisType == null) ? 0 : basisType.GetHashCode()); long temp; temp = IntUtils.floatToIntBits(beta); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); temp = IntUtils.floatToIntBits(betaSq); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); result = prime * result + bitsF; result = prime * result + d; result = prime * result + d1; result = prime * result + d2; result = prime * result + d3; result = prime * result + ((hashAlg == null) ? 0 : hashAlg.GetHashCode()); result = prime * result + ((keyGenAlg == null) ? 0 : keyGenAlg.GetHashCode()); temp = IntUtils.floatToIntBits(keyNormBound); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); temp = IntUtils.floatToIntBits(keyNormBoundSq); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); temp = IntUtils.floatToIntBits(normBound); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); temp = IntUtils.floatToIntBits(normBoundSq); result = prime * result + (int)(temp ^ (IntUtils.URShift(temp, 32))); result = prime * result + ((polyType == null) ? 0 : polyType.GetHashCode()); result = prime * result + (primeCheck ? 1231 : 1237); result = prime * result + q; result = prime * result + signFailTolerance; result = prime * result + (sparse ? 1231 : 1237); return(result); }
//@Override public override bool Equals(Object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (!(obj.GetType().IsAssignableFrom(typeof(SignatureParameters)))) { return(false); } SignatureParameters other = (SignatureParameters)obj; if (B != other.B) { return(false); } if (N != other.N) { return(false); } if (basisType == null) { if (other.basisType != null) { return(false); } } else if (!basisType.Equals(other.basisType)) { return(false); } if (IntUtils.floatToIntBits(beta) != IntUtils.floatToIntBits(other.beta)) { return(false); } if (IntUtils.floatToIntBits(betaSq) != IntUtils.floatToIntBits(other.betaSq)) { return(false); } if (bitsF != other.bitsF) { return(false); } if (d != other.d) { return(false); } if (d1 != other.d1) { return(false); } if (d2 != other.d2) { return(false); } if (d3 != other.d3) { return(false); } if (hashAlg == null) { if (other.hashAlg != null) { return(false); } } else if (!hashAlg.Equals(other.hashAlg)) { return(false); } if (keyGenAlg == null) { if (other.keyGenAlg != null) { return(false); } } else if (!keyGenAlg.Equals(other.keyGenAlg)) { return(false); } if (IntUtils.floatToIntBits(keyNormBound) != IntUtils.floatToIntBits(other.keyNormBound)) { return(false); } if (IntUtils.floatToIntBits(keyNormBoundSq) != IntUtils.floatToIntBits(other.keyNormBoundSq)) { return(false); } if (IntUtils.floatToIntBits(normBound) != IntUtils.floatToIntBits(other.normBound)) { return(false); } if (IntUtils.floatToIntBits(normBoundSq) != IntUtils.floatToIntBits(other.normBoundSq)) { return(false); } if (polyType == null) { if (other.polyType != null) { return(false); } } else if (!polyType.Equals(other.polyType)) { return(false); } if (primeCheck != other.primeCheck) { return(false); } if (q != other.q) { return(false); } if (signFailTolerance != other.signFailTolerance) { return(false); } if (sparse != other.sparse) { return(false); } return(true); }