Exemplo n.º 1
0
 public DSData(
     final int keyTagArg, final int algArg, final int digestTypeArg, final String digestArg) {
   setKeyTag(keyTagArg);
   setAlg(algArg);
   setDigestType(digestTypeArg);
   setDigest(digestArg);
 }
Exemplo n.º 2
0
  public static final DSData fromXML(final XMLDocument xmlDoc, final String dsDataXPath)
      throws Exception {
    final DSData result = new DSData();

    result.setKeyTag(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":keyTag")));
    result.setAlg(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":alg")));
    result.setDigestType(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":digestType")));
    result.setDigest(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":digest"));
    setKeyDataInDSData(xmlDoc, dsDataXPath, result);

    return result;
  }