/** * Returns if the current CryptoPacketExtension equals the one given in parameter. * * @param obj an object which might be an instance of CryptoPacketExtension. * @return True if the object in parameter is a CryptoPAcketExtension with all fields * (crypto-suite, key-params, session-params and tag) corresponding to the current one. False, * otherwsise. */ @Override public boolean equals(Object obj) { if (obj instanceof CryptoPacketExtension) { CryptoPacketExtension crypto = (CryptoPacketExtension) obj; return (crypto.equalsCryptoSuite(this.getCryptoSuite()) && crypto.equalsKeyParams(this.getKeyParams()) && crypto.equalsSessionParams(this.getSessionParams()) && crypto.equalsTag(this.getTag())); } return false; }