コード例 #1
0
ファイル: NSEC3Record.java プロジェクト: hemantdhivar/milton2
  /** Converts rdata to a String */
  String rrToString() {
    StringBuffer sb = new StringBuffer();
    sb.append(hashAlg);
    sb.append(' ');
    sb.append(flags);
    sb.append(' ');
    sb.append(iterations);
    sb.append(' ');
    if (salt == null) sb.append('-');
    else sb.append(base16.toString(salt));
    sb.append(' ');
    sb.append(b32.toString(next));

    if (!types.empty()) {
      sb.append(' ');
      sb.append(types.toString());
    }

    return sb.toString();
  }
コード例 #2
0
ファイル: NSEC3Record.java プロジェクト: hemantdhivar/milton2
  void rrToWire(DNSOutput out, Compression c, boolean canonical) {
    out.writeU8(hashAlg);
    out.writeU8(flags);
    out.writeU16(iterations);

    if (salt != null) {
      out.writeU8(salt.length);
      out.writeByteArray(salt);
    } else out.writeU8(0);

    out.writeU8(next.length);
    out.writeByteArray(next);
    types.toWire(out);
  }
コード例 #3
0
ファイル: NSEC3Record.java プロジェクト: hemantdhivar/milton2
 /** Returns whether a specific type is in the set of types. */
 public boolean hasType(int type) {
   return types.contains(type);
 }
コード例 #4
0
ファイル: NSEC3Record.java プロジェクト: hemantdhivar/milton2
 /** Returns the set of types defined for this name */
 public int[] getTypes() {
   return types.toArray();
 }