if ((!this.field.equals(otherMatrix.field)) || (otherMatrix.numRows != this.numColumns) || (otherMatrix.numColumns != this.numColumns))
if ((!this.field.equals(otherMatrix.field)) || (otherMatrix.numRows != this.numColumns) || (otherMatrix.numColumns != this.numColumns))
if ((!this.field.equals(otherMatrix.field)) || (otherMatrix.numRows != this.numColumns) || (otherMatrix.numColumns != this.numColumns))
/** * Compare this vector with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2mVector)) { return false; } GF2mVector otherVec = (GF2mVector)other; if (!field.equals(otherVec.field)) { return false; } return IntUtils.equals(vector, otherVec.vector); }
/** * Compare this vector with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2mVector)) { return false; } GF2mVector otherVec = (GF2mVector)other; if (!field.equals(otherVec.field)) { return false; } return IntUtils.equals(vector, otherVec.vector); }
/** * checks if given object is equal to this polynomial. * <p> * The method returns false whenever the given object is not polynomial over * GF(2^m). * * @param other object * @return true or false */ public boolean equals(Object other) { if (other == null || !(other instanceof PolynomialGF2mSmallM)) { return false; } PolynomialGF2mSmallM p = (PolynomialGF2mSmallM)other; if ((field.equals(p.field)) && (degree == p.degree) && (isEqual(coefficients, p.coefficients))) { return true; } return false; }
/** * checks if given object is equal to this polynomial. * <p> * The method returns false whenever the given object is not polynomial over * GF(2^m). * * @param other object * @return true or false */ public boolean equals(Object other) { if (other == null || !(other instanceof PolynomialGF2mSmallM)) { return false; } PolynomialGF2mSmallM p = (PolynomialGF2mSmallM)other; if ((field.equals(p.field)) && (degree == p.degree) && (isEqual(coefficients, p.coefficients))) { return true; } return false; }
/** * Compare this key with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (other == null || !(other instanceof BCMcElieceCCA2PrivateKey)) { return false; } BCMcElieceCCA2PrivateKey otherKey = (BCMcElieceCCA2PrivateKey)other; return (getN() == otherKey.getN()) && (getK() == otherKey.getK()) && getField().equals(otherKey.getField()) && getGoppaPoly().equals(otherKey.getGoppaPoly()) && getP().equals(otherKey.getP()) && getH().equals(otherKey.getH()); }
/** * Compare this key with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof BCMcEliecePrivateKey)) { return false; } BCMcEliecePrivateKey otherKey = (BCMcEliecePrivateKey)other; return (getN() == otherKey.getN()) && (getK() == otherKey.getK()) && getField().equals(otherKey.getField()) && getGoppaPoly().equals(otherKey.getGoppaPoly()) && getSInv().equals(otherKey.getSInv()) && getP1().equals(otherKey.getP1()) && getP2().equals(otherKey.getP2()); }