/** * 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()); }
/** * 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()); }