public static final void appendDsDataElement( final XMLWriter xmlWriter, final Element parentElement, final DSData dsData) { final Element dsDataElement = SecDNSXMLUtil.createElement(xmlWriter, parentElement, "dsData"); SecDNSXMLUtil.appendChildElement(xmlWriter, dsDataElement, "keyTag", dsData.getKeyTag()); SecDNSXMLUtil.appendChildElement(xmlWriter, dsDataElement, "alg", dsData.getAlg()); SecDNSXMLUtil.appendChildElement( xmlWriter, dsDataElement, "digestType", dsData.getDigestType()); SecDNSXMLUtil.appendChildElement(xmlWriter, dsDataElement, "digest", dsData.getDigest()); if (dsData.getKeyData() != null) { KeyData.appendKeyDataElement(xmlWriter, dsDataElement, dsData.getKeyData()); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DSData other = (DSData) obj; if (alg != other.alg) return false; if (digest == null) { if (other.digest != null) return false; } else if (!digest.equals(other.digest)) return false; if (digestType != other.digestType) return false; if (keyTag != other.keyTag) return false; if (keyData != null && !keyData.equals(other.getKeyData())) { return false; } return true; }